Arc function (wingdi.h)
The Arc function draws an elliptical arc.
Syntax
BOOL Arc(
[in] HDC hdc,
[in] int x1,
[in] int y1,
[in] int x2,
[in] int y2,
[in] int x3,
[in] int y3,
[in] int x4,
[in] int y4
);
Parameters
[in] hdc
A handle to the device context where drawing takes place.
[in] x1
The x-coordinate, in logical units, of the upper-left corner of the bounding rectangle.
[in] y1
The y-coordinate, in logical units, of the upper-left corner of the bounding rectangle.
[in] x2
The x-coordinate, in logical units, of the lower-right corner of the bounding rectangle.
[in] y2
The y-coordinate, in logical units, of the lower-right corner of the bounding rectangle.
[in] x3
The x-coordinate, in logical units, of the ending point of the radial line defining the starting point of the arc.
[in] y3
The y-coordinate, in logical units, of the ending point of the radial line defining the starting point of the arc.
[in] x4
The x-coordinate, in logical units, of the ending point of the radial line defining the ending point of the arc.
[in] y4
The y-coordinate, in logical units, of the ending point of the radial line defining the ending point of the arc.
Return value
If the arc is drawn, the return value is nonzero.
If the arc is not drawn, the return value is zero.
Remarks
The points (nLeftRect, nTopRect) and (nRightRect, nBottomRect) specify the bounding rectangle. An ellipse formed by the specified bounding rectangle defines the curve of the arc. The arc extends in the current drawing direction from the point where it intersects the radial from the center of the bounding rectangle to the (nXStartArc, nYStartArc) point. The arc ends where it intersects the radial from the center of the bounding rectangle to the (nXEndArc, nYEndArc) point. If the starting point and ending point are the same, a complete ellipse is drawn.
The arc is drawn using the current pen; it is not filled.
The current position is neither used nor updated by Arc.
Use the GetArcDirection and SetArcDirection functions to get and set the current drawing direction for a device context. The default drawing direction is counterclockwise.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |