BCX_CIRCLE function
Purpose: BCX_CIRCLE
draws a circle.
Syntax:
RetVal% = BCX_CIRCLE(hWnd, _
RPX%, _
RPY%, _
Radius% _
[, Pen] _
[,Fill] _
[, DrawHDC])
Parameters:
- hWnd Identifies the window where drawing takes
place.
- RPX% X-coordinate of the center of the circle.
- RPY% Y-coordinate of the center of the circle.
- Radius% Radius of the circle.
- Pen [OPTIONAL] an integer
COLORREF representing the RGB color. The
default is 0 which is a black pen.
- Fill [OPTIONAL] integer 0 or 1.
The default is zero which will not fill the CIRCLE. A value of 1
will fill the CIRCLE with the color defined in the Pen
parameter.
- DrawHDC [OPTIONAL] HDC (Handle to Device Context) pointing to an already
open HDC. This is useful if a device
context is to be written to many times. In this case the programmer
is responsible for closing the HDC at the
appropriate time.
Return Value:
- RetVal% Nonzero integer if the function succeeds, zero
if the function fails.
|
Example:
GUI "BCX_CIRCLE"
SUB FORMLOAD
GLOBAL Form1 AS HWND
Form1 = BCX_FORM("BCX_CIRCLE", 0, 0, 130, 115)
BCX_SET_FORM_COLOR(Form1,QBCOLOR(1))
CENTER(Form1)
SHOW(Form1)
END SUB
BEGIN EVENTS
SELECT CASE CBMSG
CASE WM_PAINT
CALL DrawStuff
END SELECT
END EVENTS
SUB DrawStuff
BCX_CIRCLE(Form1,125,105,95,QBCOLOR(14),1)
BCX_ARC(Form1,50,50,170,160,60,110,160,110,QBCOLOR(9)) ' Mouth
BCX_ARC(Form1,65,60,95,100,20,20,20,20,QBCOLOR(9)) ' Left eye
BCX_ARC(Form1,125,60,155,100,20,20,20,20,QBCOLOR(9)) ' Right Eye
END SUB