GetArcDirection Function

Declare Function GetArcDirection Lib "gdi32.dll" (ByVal hdc As Long)

Platforms: Win 32s, Win 95/98, Win NT

GetArcDirection determines the direction in which arcs are drawn on a graphics-capable device. Arcs can be drawn either clockwise or counterclockwise from the starting point to the ending point. Although this function is supported in Win 95/98, that platform ignores the setting and always draws arcs counterclockwise! The function returns 0 if an error occured, or exactly one of the following flags specifying which direction arcs on the device will be drawn:

AD_CLOCKWISE = 2
Arcs are drawn clockwise from the starting point to the ending point.
AD_COUNTERCLOCKWISE = 1
Arcs are drawn counterclockwise from the starting point to the ending point.
hdc
The device context of the device to find the arc-drawing direction of.

Example:

' Display which direction window Form1 draws arcs.
Dim arcdir As Long  ' receives arc direction

arcdir = GetArcDirection(Form1.hDC)  ' get the arc direction for Form1
If arcdir = AD_CLOCKWISE Then
  Debug.Print "Form1 draws arcs clockwise."
ElseIf arcdir = AD_COUNTERCLOCKWISE Then
  Debug.Print "Form1 draws arcs counterclockwise."
End If

Related Calls: AngleArc, Arc, ArcTo, SetArcDirection
Category: Lines & Curves
Back to the index.


Go to Paul Kuliniewicz's Home Page.
E-mail: rogue953@hotmail.com
This page is at http://skyscraper.fortunecity.com/transmission/45/api/g/getarcdirection.html