Small Basic Forum
Error by LDGraphicsWindow.FloodFill - Printable Version

+- Small Basic Forum (https://litdev.uk/mybb)
+-- Forum: Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=1)
+--- Forum: Extensions (https://litdev.uk/mybb/forumdisplay.php?fid=3)
+--- Thread: Error by LDGraphicsWindow.FloodFill (/showthread.php?tid=389)



Error by LDGraphicsWindow.FloodFill - martmen - 06-07-2025

Hello LitDev,
In the program MJPH297.000, the command
Code:
LDGraphicsWindow.FloodFill(HGWW, HGWH, "Yellow")
is executed incorrectly. It does not fill the rectangle in the center of the window. Could you please correct this?

Thank you,
Martin

Translated by Capilot


RE: Error by LDGraphicsWindow.FloodFill - AbsoluteBeginner - 06-07-2025

Hello, Martin  Shy

The Help says: "This only applies to the drawing layer of the GraphicsWindow.".

The Rectangle SHAPE is drawn not on the Graphics Window layer, but ABOVE that layer.
Your source code colors the entire Graphics Window yellow. And on top of this layer, your Rectangle is drawn.

If you draw a Rectangle ON the Graphics Window itself, then this Rectangle becomes yellow.
Code:
GraphicsWindow.BackgroundColor = "Green"

GraphicsWindow.DrawRectangle(HHGWW, HHGWH, HGWW, HGWH)
'SRecheck = Shapes.AddRectangle(HGWW, HGWH)
'Shapes.Move(SRecheck, HHGWW, HHGWH)

LDGraphicsWindow.FloodFill(HGWW, HGWH, "Yellow")