BCX_POLYGON function
Purpose: BCX_POLYGON function draws a polygon consisting of two or more vertices connected by straight lines. The polygon is outlined by using the current pen and filled by using the current brush and polygon fill mode.
Syntax: RetVal% = BCX_POLYGON(hWnd, _ pVertX, _ numVertX%, _ [, Pen] _ [, DrawHDC]) Parameters:
Return Value:
|
Here is an example of the BCX_POLYGON function.
GUI "BCX_POLYGON" DIM pVertX[10] AS POINT SUB FORMLOAD GLOBAL Form1 AS HWND DIM i% DIM pi2# pi2# = 8.0 * ATN(1.0) FOR i = 0 TO 9 pVertX[i].x = 125 + SIN(pi2# * i% / 10) * 55 pVertX[i].y = 95 + COS(pi2# * i% / 10) * 55 NEXT Form1 = BCX_FORM("BCX_POLYGON", 0, 0, 130, 110) BCX_SET_FORM_COLOR(Form1,QBCOLOR(31)) CENTER(Form1) SHOW(Form1) END SUB BEGIN EVENTS SELECT CASE CBMSG CASE WM_PAINT CALL DrawStuff CASE WM_CLOSE DestroyWindow(Form1) EXIT FUNCTION END SELECT END EVENTS SUB DrawStuff DIM RAW RetVal% RetVal% = BCX_POLYGON(Form1, pVertX , 10 ,QBCOLOR(4)) END SUB