BCX_ARC function
Purpose: BCX_ARC draws an
elliptical arc.
Syntax:
RetVal% = BCX_ARC(hWnd, _
Left, _
Top, _
Right, _
Bottom, _
BCX, _
BCY, _
ECX, _
ECY _
[, Pen] _
[, DrawHDC])
Parameters:
- hWnd Identifies the window where drawing takes
place.
- Left X-coordinate of the upper-left corner of a bounding
rectangle.
- Top Y-coordinate of the upper-left corner of a bounding
rectangle.
- Right X-coordinate of the lower-right corner of a
bounding rectangle.
- Bottom Y-coordinate of the lower-right corner of a
bounding rectangle.
- BCX X-coordinate of the starting point of the arc.
- BCY Y-coordinate of the starting point of the arc.
- ECX X-coordinate of the ending point of the arc.
- ECY Y-coordinate of the ending point of the arc.
- Pen [OPTIONAL] a COLORREF integer specifying an RGB color. The default
is 0 which is a black pen.
- 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_ARC"
SUB FORMLOAD
GLOBAL Form1 AS HWND
Form1 = BCX_FORM("BCX_ARC", 0, 0, 115, 115)
BCX_SET_FORM_COLOR(Form1,QBCOLOR(14))
CENTER(Form1)
SHOW(Form1)
END SUB
BEGIN EVENTS
SELECT CASE CBMSG
CASE WM_PAINT
CALL DrawStuff
END SELECT
END EVENTS
SUB DrawStuff
BCX_ARC(Form1,10,10,210,200,90,90,90,90,QBCOLOR(9))
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
Another example using the BCX_ARC function is BCX_GRAFX_DEMO.bas