Arc

  BOOL Arc(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect, nXStartArc, nYStartArc, nXEndArc, nYEndArc)    
  HDC hdc; /* handle of device context */
  int nLeftRect; /* upper-left corner of bounding rectangle */
  int nTopRect; /* upper-left corner of bounding rectangle */
  int nRightRect; /* lower-right corner of bounding rectangle */
  int nBottomRect; /* lower-right corner of bounding rectangle */
  int nXStartArc; /* first radial-line endpoint */
  int nYStartArc; /* first radial-line endpoint */
  int nXEndArc; /* second radial-line endpoint */
  int nYEndArc; /* second radial-line endpoint */

The Arc function draws an elliptical arc.

Parameters

hdc

Identifies the device context where drawing will take place.

nLeftRect

Specifies the logical x-coordinate of the upper-left corner of the bounding rectangle.

nTopRect

Specifies the logical y-coordinate of the upper-left corner of the bounding rectangle.

nRightRect

Specifies the logical x-coordinate of the lower-right corner of the bounding rectangle.

nBottomRect

Specifies the logical y-coordinate of the lower-right corner of the bounding rectangle.

nXStartArc

Specifies the logical x-coordinate of the end-point of the radial line defining the start-point of the arc.

nYStartArc

Specifies the logical y-coordinate of the end-point of the radial line defining the start-point of the arc.

nXEndArc

Specifies the logical x-coordinate of the end-point of the radial line defining the end-point of the arc.

nYEndArc

Specifies the logical y-coordinate of the end-point of the radial line defining the end-point of the arc.

Return Value

The return value is TRUE if the arc is drawn. Otherwise, it is FALSE.

Comments

The curve of the arc is defined by an ellipse that is formed by the given bounding rectangle. The bounding rectangle is specified by the points (nLeftRect, nTopRect) and (nRightRect, nBottomRect). The arc extends counterclockwise from the point where it intersects the radial line from the center of the bounding rectangle to (nXStartArc, nYStartArc). The arc ends where it intersects the radial line from the center of the bounding rectangle to (nXEndArc, nYEndArc). If the start-point and end-point are the same, a complete ellipse is drawn.

The arc is drawn using the current pen. Since an arc does not define a closed area, it is not filled.

The current position is neither used nor updated by this function.

See Also

AngleArc, ArcTo, Chord, Ellipse, Pie