PenType enumeration (gdiplusenums.h)

The PenType enumeration indicates the type of pattern, texture, or gradient that a pen draws.

Syntax

typedef enum PenType {
  PenTypeSolidColor,
  PenTypeHatchFill,
  PenTypeTextureFill,
  PenTypePathGradient,
  PenTypeLinearGradient,
  PenTypeUnknown = -1
} ;

Constants

 
PenTypeSolidColor
Indicates that the pen draws with a solid color.
PenTypeHatchFill
Indicates that the pen draws with a hatch pattern that is specified by a
HatchBrush object.
PenTypeTextureFill
Indicates that the pen draws with a texture that is specified by a
TextureBrush object.
PenTypePathGradient
Indicates that the pen draws with a color gradient that is specified by a
PathGradientBrush object.
PenTypeLinearGradient
Indicates that the pen draws with a color gradient that is specified by a
LinearGradientBrush object.
PenTypeUnknown
Value: -1
Indicates that the pen type is unknown.

Remarks

A pen's type is determined when the pen is constructed. For example, if you pass a HatchBrush object to a Pen constructor, then the pen that is constructed has a pen type of PenTypeHatchFill. If you pass a Color object or a SolidBrush object to a Pen constructor, then the pen that is constructed has a pen type of PenTypeSolidColor.

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)