Shiny Language Reference

Language Reference > Drawing Functions


drawellipse

drawellipse(int X, int Y, int X2, int Y2, bool Filled, int RGBColour);

 

 

Draws a filled or hollow ellipse

DRAWELLIPSE draws an elliptical shape in the specified bounding coordinates using the current pen (set by selectpen) and optionally fills it with the specified colour. The bounding rectangle determines the ellipse size and shape, therefore providing a symmetrical rectangle (ie: square) will cause a circle to be drawn.

This statement is only valid in the Render handler.

 

Parameters

X

The X position of the top left of the bounding rectangle. 0 is the top left corner of the display panel.

Y

The Y position of the top left of the bounding rectangle. 0 is the top left corner of the display panel.

X2

The X position of the bottom right of the bounding rectangle.

Y2

The Y position of the bottom right of the bounding rectangle.

Filled

TRUE when the ellipse should be filled with RGBColour, otherwise FALSE to draw a hollow ellipse.

RGBColour

The RGB colour to fill the ellipse with when the Filled parameter is set to TRUE, supplied as an integer. To create this value from RGB components, use the RGB statement. When Filled is set to FALSE this parameter is ignored, you may specify 0 in this case.

Return Value

None

 

Example Code

// Draw a hollow ellipse that fits the rectangle X:10, Y:10 to X:50, Y:50
drawellipse(10, 10, 50, 50, False, 0);