ArcTo

  BOOL ArcTo(hdc, X1, Y1, X2, Y2, X3, Y3, X4, Y4)    
  HDC hdc; /* handle of device context */
  int X1; /* upper-left corner of bounding rectangle */
  int Y1; /* upper-left corner of bounding rectangle */
  int X2; /* lower-right corner of bounding rectangle */
  int Y2; /* lower-right corner of bounding rectangle */
  int X3; /* first radial-line endpoint */
  int Y3; /* first radial-line endpoint */
  int X4; /* second radial-line endpoint */
  int Y4; /* second radial-line endpoint */

The ArcTo function draws an elliptical arc.

Parameters

hdc

Identifies the device context where drawing will take place.

X1

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

Y1

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

X2

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

Y2

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

X3

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

Y3

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

X4

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

Y4

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

This function is similar to Arc, except that the current position is updated.

The curve of the arc is defined by the ellipse formed from the given bounding rectangle. The bounding rectangle is specified by the points (X1, Y1) and (X2, Y2). The arc extends counterclockwise from the point where it intersects the radial line from the center of the bounding rectangle to (X3, Y3). The arc ends where it intersects the radial line from the center of the bounding rectangle to (X4, Y4). If the start-point and end-point are the same, a complete ellipse is drawn.

A line is drawn from the current position to the start-point of the arc. If no error occurs, the current position is set to the end-point of the arc.

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

See Also

Arc, AngleArc