DynaPDF.SetDrawDirection
------------------------

The function sets the draw direction of closed vector graphics such as rectangles, ellipses, triangles and so on.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [3.2](newinversion32.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.SetDrawDirection"; PDF; Direction ) 

**MBS**( **"DynaPDF.SetDrawDirection";** /\* The function sets the draw direction of closed vector graphics such as rectangles, ellipses, triangles and so on. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Direction**) /\* Draw direction. Can be CounterClockwise or Clockwise.e.g. "Clockwise" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Direction | Draw direction. Can be CounterClockwise or Clockwise. | "Clockwise" |

### Result

Returns OK or error message.

### Description

The function sets the draw direction of closed vector graphics such as rectangles, ellipses, triangles and so on.   
The draw direction is important if a path should be filled with the nonzero winding number rule or even-odd rule. Both modes are described in detail under ClipPath().  
See also [SetDrawDirection](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetDrawDirection.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.ClosePath](DynaPDFClosePath.md)
- [DynaPDF.DrawArcEx](DynaPDFDrawArcEx.md)
- [DynaPDF.DrawCircle](DynaPDFDrawCircle.md)
- [DynaPDF.DrawPie](DynaPDFDrawPie.md)
- [DynaPDF.Ellipse](DynaPDFEllipse.md)
- [DynaPDF.GetDrawDirection](DynaPDFGetDrawDirection.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.RoundRect](DynaPDFRoundRect.md)
- [DynaPDF.RoundRectEx](DynaPDFRoundRectEx.md)
- [DynaPDF.Triangle](DynaPDFTriangle.md)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[DynaPDF.SetDocInfoEx](DynaPDFSetDocInfoEx.md) - [DynaPDF.SetExtColorSpace](DynaPDFSetExtColorSpace.md)

[HTML Version](DynaPDFSetDrawDirection.shtml)