Flood Fill lazarus / 39-Graphics ---------------------------------------------------------------------- JasonLugg · 2017-08-29 18:42 Hi All Thanks in advance. I am struggling with flood fill. If I draw a (closed) shape on a tImage.Canvas and then choose flood fill, the closed shape is filled which is all good. However, If I load an image and copy it to the canvas in question, and then chose flood fill the entire image is filled (i.e fill does not stop at a boundary)? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i tTileIn.Canvas.Brush.Color:=tColourIn;     tTileIn.Canvas.FloodFill(MouseXIn, MouseYIn, tColourIn, tFillStyle.fsBorder);     tTileIn.Refresh;                                                           I have tried both fill styles to no avail! Any help much appreciated. [Win 7]. ---------------------------------------------------------------------- howardpc · 2017-08-29 19:01 FloodFill fills the area around (X,Y) with the current Brush.Color. It stops filling when it meets a border (fsBorder) of a different Color (specified as a parameter in the call), or a solid region (fsSurface) of a different Color, or when  it reaches the bounds of the canvas.