DQBpaint
SUB

Prototype

DECLARE SUB DQBpaint (BYVAL Layer, BYVAL x, BYVAL y, BYVAL Col)

Parameters

Layer - Layer where to act

x - X coordinate where to start filling

y - Y coordinate where to start filling

Col - Filling color

Returns

none

Description

As normal PAINT statement, this function fills any closed area, by starting to fill at specified coordinates; the area is filled until a border with a color different from specified one is encountered.

Notes:

Actually this function is slower than normal PAINT, but unlike it, DQBpaint has the advantage that it fills only until a border with any different color is hit.

Example

*****************************************************************************

' All integers for speed
DEFINT A-Z

'$INCLUDE:'DIRECTQB.BI'

' Let's initialize the library with no extra layers nor sounds nor EMS
IF DQBinit(0, 0, 0) THEN DQBclose: PRINT DQBerror$: END

DQBinitVGA

' Draws a closed figure on the screen
DQBellipse VIDEO, 160, 100, 100, 60, 40
DQBbox VIDEO, 100, 30, 150, 110, 11

' Paints it!
DQBpaint VIDEO, 160, 100, 4

' Let's wait for the user to press a key...
WHILE INKEY$ = "": WEND

' Ends program
DQBclose

*****************************************************************************