int CanvasDrawOval (int panelHandle, int controlID, Rect rect, int drawMode);
Draws an oval on the canvas control within the specified rectangle.
CanvasDrawOval draws the frame of the oval using the current value of the following attributes:
ATTR_PEN_COLOR
ATTR_PEN_MODE
ATTR_PEN_WIDTH
ATTR_PEN_STYLE (ignored when pen width is greater than one)
CanvasDrawOval draws the interior of the oval using the current value of the following attributes:
ATTR_PEN_FILL_COLOR
ATTR_PEN_MODE
ATTR_PEN_PATTERN
Input | ||
Name | Type | Description |
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel. |
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl. |
rect | Rect | Rect structure specifying the location and size of the rectangle within which to draw the oval. The Rect structure is defined as follows: typedef struct { int top; int left; int height; int width; } Rect; You can create a Rect without having to declare a variable by using the following function: Rect MakeRect (int top, int left, int height, int width); ExampleCanvasDrawOval (panelHandle, controlID, MakeRect(20,30,150,200), VAL_DRAW_FRAME); |
drawMode | integer | Specifies whether to draw the oval frame, or interior, or both. The following lists the valid values. VAL_DRAW_FRAME VAL_DRAW_INTERIOR VAL_DRAW_FRAME_AND_INTERIOR |
Name | Type | Description | ||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|