Ellipse

float x, float y, float xRadius, float yRadius,
float outlineWidth = 1.0, float angle = 0.0,
float accuracy = [default] )

Creates a new ellipse with the specified centre, horizontal and vertical radiuses and angle.

Vec2D pos, Vec2D radiuses,
float outlineWidth = 1.0, float angle = 0.0,
float accuracy = [default)

Same as above but by using vectors.

Public fields
Vec2D pos - The centre of the ellipse
float angle - The rotation angle of the ellipse

See the examples of how to easily render an ellipse to the screen by using a temporary object. If you want a circle instead of an ellipse, you can either make an ellipse with the same x and y radiuses or to use the Circle class.

Examples

// Create a new ellipse such that the centre is at x = 200.0, y = 100.0 //
// and the radiuses are horizontal: 50.0 and vertical: 30.0 //
Ellipse myEllipse( 200.0100.050.030.0 );

// Draw the ellipse to the canvas filled with blue //
myEllipse.DrawRgba::BLUE );

// You can create and ellipse and draw it with a single line //
Ellipse200.0100.050.030.0 ).DrawRgba::BLUE );


Member functions
Draw
Draws the ellipse filled with the specified color
DrawOutline
Draws the outline of the ellipse
DrawSlice
Draws a slice of the ellipse
DrawDisk
Draws a filled disk
DrawArc
Draws a filled arc of an ellipse
SetRadius
Sets the x or y radius of the ellipse
GetRadius
Returns the x or y axis of the ellipse

Derived Classes
Circle
Stores a circle

Parent Class


Questions about Ellipse? Click here.