This enum contains the styles of graphics pens.

public enum class PenStyle
  Solid       = 0,
  Dash        = 1,
  Dot         = 2,
  DashDot     = 3,
  DashDotDot  = 4,
  Null        = 5,
  InsideFrame = 6,
  User        = 7,
  Alternate   = 8, 

  EndRound  = 0x00000000,
  EndSquare = 0x00000100,
  EndFlat   = 0x00000200,

  JoinRound = 0x00000000,
  JoinBevel = 0x00001000,
  JoinMitre = 0x00002000,

  Cosmetic  = 0x00000000,
  Geometric = 0x00010000,


Options within the above groupings are mutually exclusive.

The style Null leads to an invisible pen. The style Alternate causes alternative pixels to be drawn.

The style InsideFrame causes the pen to be adjusted to fit entirely within a bounding rectangle when used with graphics functions for which bounding rectangles apply. This style is applicable only to geometric pens.

The style User allows an application to define the pen characteristics using an array (see LogicalPenExtended and Pen::Pen - Extended).

The styles Cosmetic and Geometric are applicable when creating pens through the constructor Pen::Pen - Extended. A geometric pen is a pen whose width is affected by transformations; whereas, a cosmetic pen is unaffected by transformations.

The line join and end characteristics of a pen apply only to geometric pens created through the constructor Pen::Pen - Extended. Examples of the line end and line join properties are shown in the diagram below.


Name Space IPlusPlus::Graphics
Assembly IPlusPlus.Constants.dll