Reference » Window classes » MWindow » drawArc

Elgrint::MWindow::drawArc(MPoint,MSize,double,double) method

Declaration (see MWindow.h):

void drawArc(const MPoint& center, const MSize& rad, double startAngle = 0, double endAngle = 360);

Description

Draws an elliptical arc outline using the specified parameters.

drawArc

Parameters:

Name Type Def value Description
center MPoint

The center point of the ellipse.

Details: If center is invalid, nothing is drawn. Otherwise, center is transformed according to the latest setDrawTransform.

Remarks:

  • The z component is reserved for the future support of 3D drawing

rad MSize

The horizontal (rad.w) and vertical (rad.h) radii of the ellipse in pixels.

Details: If rad.h is equal to Same, the arc will be circular (i.e. rad.h is the same as rad.w). Except for this specific case, rad must be valid, or nothing will be drawn. Also, nothing is drawn if rad.w or rad.h is non-positive.
A valid rad is transformed according to the latest setDrawTransform.

Remarks:

  • The radii are not necessarily integral
  • The d component is reserved for the future support of 3D drawing

startAngle double 0

Starting angle (in degrees).

Details: Angle 0 is the positive x-axis, increasing counter-clockwise.

endAngle double 360

Ending angle (in degrees).

Details: Angle 0 is the positive x-axis, increasing counter-clockwise. endAngle must be greater than startAngle, or nothing will be drawn.

Details

The arc is drawn using the specified center point, the radii, and angles. The arc is spanned counter-clockwise from startAngle to endAngle. If endAngle is less than or equal to startAngle, the function has no effect.

The drawing parameters (e.g. color) are specified by the preceding setDrawSettings.

Remarks

Example

Let us know

Please Contact us to report any errors on this page, or to suggest any improvements.

Miranor Home | About Miranor | About Elgrint | Create account | Login | Account settings | Contact Us | Privacy Policy | Site map

© Copyright 2014 by Miranor. All rights reserved. By using this site you agree to the Terms of Use.

Page last updated on August 10th, 2014.