Fill(x,y,col)
Fill(x,y,col)
FillArea(x,y,border,colour) needs a border colour, so if I want to fill a screen area surrounded by different colours, it is useless. How about a Fill(x,y,colour) fill function that fills only pixels that are not different from the on coordinates x,y. Or has anyone made such flood fill function/plugin?
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
just take a look at:
viewtopic.php?t=15608&highlight=myfill
viewtopic.php?t=15608&highlight=myfill
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
If you can use a Windows-only solution, look at the second ExtFloodFill() call - the one with the #FLOODFILLSURFACE parameter:
Regards,
Eric
Code: Select all
#FLOODFILLBORDER = 0
#FLOODFILLSURFACE = 1
OpenWindow(0, 0, 0, 320, 240, #PB_Window_MinimizeGadget|#PB_Window_ScreenCentered, "FloodFill")
hdc.l = StartDrawing( WindowOutput() )
If hdc
; draw red box outline
DrawingMode(4)
FrontColor(255, 0, 0)
Box(20, 20, 280, 100)
Delay(1000)
; fill box with blue
DrawingMode(1)
FrontColor(0, 0, 255)
ExtFloodFill_(hdc, 25, 25, #red, #FLOODFILLBORDER)
Delay(1000)
; draw green box
FrontColor(0, 255, 0)
Box(20, 130, 280, 100)
Delay(1000)
; fill box with blue
FrontColor(0, 0, 255)
ExtFloodFill_(hdc, 25, 135, #green, #FLOODFILLSURFACE)
Delay(1000)
StopDrawing()
EndIf
Repeat
Until WindowEvent() = #PB_Event_CloseWindow
Eric