Small Basic Forum

Full Version: Error by LDGraphicsWindow.FloodFill
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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")