Jalaj P. Jha

Technical & Miscellaneous Ramblings

GetArcDirection and SetArcDirection functions

with one comment

As already described in WinAPI Elliptical Arc Functions the arc are drawn from the starting point to the end point in ConterClockwise (or Anti-Clockwise) direction.

The behaviour as described above is associated with the device context and can be determined using the GetArcDirection function and modified using the SetArcDirection function.

The GetArcDirection as defined below takes as a single parameter the handle to the device context and returns a value which may be any of the constants as defined which will tell us the direction that the arc is drawn.

Public Declare Function GetArcDirection Lib "gdi32" ( _
    ByVal hdc As Long) As Long

Const AD_COUNTERCLOCKWISE = 1
Const AD_CLOCKWISE = 2

Similarly the SetArcDirection function takes for the first parameter the handle to the device context and one of the value as defined by the constants defined above and sets the device context to follow the same for drawing arcs.

Public Declare Function SetArcDirection Lib "gdi32" ( _
    ByVal hdc As Long, ByVal ArcDirection As Long) As Long

Written by Jalaj

February 18th, 2007 at 10:04 am

Posted in Visual Basic, WinAPI

Tagged with

One Response to 'GetArcDirection and SetArcDirection functions'

Subscribe to comments with RSS or TrackBack to 'GetArcDirection and SetArcDirection functions'.

  1. [...] GetArcDirection and SetArcDirection functions [...]

Leave a Reply