LineCap enumeration (gdiplusenums.h)

The LineCap enumeration specifies the type of graphic shape to use on the end of a line drawn with a Windows GDI+ pen. The cap can be a square, circle, triangle, arrowhead, custom, or masked (hidden). End caps can also "anchor" the line by centering the cap at the end of the line.

Syntax

typedef enum LineCap {
  LineCapFlat = 0,
  LineCapSquare = 1,
  LineCapRound = 2,
  LineCapTriangle = 3,
  LineCapNoAnchor = 0x10,
  LineCapSquareAnchor = 0x11,
  LineCapRoundAnchor = 0x12,
  LineCapDiamondAnchor = 0x13,
  LineCapArrowAnchor = 0x14,
  LineCapCustom = 0xff,
  LineCapAnchorMask = 0xf0
} ;

Constants

 
LineCapFlat
Value: 0
Specifies that the line ends at the last point. The end is squared off.
LineCapSquare
Value: 1
Specifies a square cap. The center of the square is the last point in the line. The height and width of the square are the line width.
LineCapRound
Value: 2
Specifies a circular cap. The center of the circle is the last point in the line. The diameter of the circle is the line width.
LineCapTriangle
Value: 3
Specifies a triangular cap. The base of the triangle is the last point in the line. The base of the triangle is the line width.
LineCapNoAnchor
Value: 0x10
Specifies that the line ends are not anchored.
LineCapSquareAnchor
Value: 0x11
Specifies that the line ends are anchored with a square. The center of the square is the last point in the line. The height and width of the square are the line width.
LineCapRoundAnchor
Value: 0x12
Specifies that the line ends are anchored with a circle. The center of the circle is at the last point in the line. The circle is wider than the line.
LineCapDiamondAnchor
Value: 0x13
Specifies that the line ends are anchored with a diamond (a square turned at 45 degrees). The center of the diamond is at the last point in the line. The diamond is wider than the line.
LineCapArrowAnchor
Value: 0x14
Specifies that the line ends are anchored with arrowheads. The arrowhead point is located at the last point in the line. The arrowhead is wider than the line.
LineCapCustom
Value: 0xff
Specifies that the line ends are made from a
CustomLineCap.
LineCapAnchorMask
Value: 0xf0

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header gdiplusenums.h (include Gdiplus.h)