wPen

A pen is a drawing tool for drawing outlines.

Superclass:wGdiObject
Seealso:wDC wPredefined
Consts:
Pen StylesDescription
wPenJoinBevelPS_JOIN_BEVEL
wPenJoinMiterPS_JOIN_MITER
wPenJoinRoundPS_JOIN_ROUND
wPenJoinMaskPS_JOIN_MASK
wPenCapRoundPS_ENDCAP_ROUND
wPenCapProjectingPS_ENDCAP_SQUARE
wPenCapButtPS_ENDCAP_FLAT
wPenCapMaskPS_ENDCAP_MASK
wPenStyleSolidSolid style.
wPenStyleDotDotted style.
wPenStyleDashDashed style.
wPenStyleDot_DASHDot and dash style.
wPenStyleTransparentNo pen is used.
wPenStyleMaskPen style mask.
wPenStyleBdiagonalHatchBackward diagonal hatch.
wPenStyleCrossdiagHatchCross-diagonal hatch.
wPenStyleFdiagonalHatchForward diagonal hatch.
wPenStyleCrossHatchCross hatch.
wPenStyleHorizontalHatchHorizontal hatch.
wPenStyleVerticalHatchVertical hatch.
wPenStyleMaskHatchHatch style mask.

Types

wPenError = object of wGdiObjectError
  
An error raised when wPen creation failed.

Consts

wPenJoinBevel = 0x00001000
wPenJoinMiter = 0x00002000
wPenJoinRound = 0x00000000
wPenJoinMask = 0x0000F000
wPenCapRound = 0x00000000
wPenCapProjecting = 0x00000100
wPenCapButt = 0x00000200
wPenCapMask = 0x00000F00
wPenStyleSolid = 0
wPenStyleDot = 2
wPenStyleDash = 1
wPenStyleDot_DASH = 3
wPenStyleTransparent = 5
wPenStyleMask = 0x0000000F
wPenStyleBdiagonalHatch = 196608
wPenStyleCrossdiagHatch = 327680
wPenStyleFdiagonalHatch = 131072
wPenStyleCrossHatch = 262144
wPenStyleHorizontalHatch = 0
wPenStyleVerticalHatch = 65536
wPenStyleMaskHatch = 0x00FF0000

Procs

proc final(self: wPen) {...}{.raises: [], tags: [].}
Default finalizer for wPen.
proc init(self: wPen; color = wBlack; style = 0 or 0x00000000; width = 1) {...}{.validate,
    raises: [], tags: [].}
Initializer.
proc Pen(color = wBlack; style = 0 or 0x00000000; width = 1): wPen {...}{.inline, raises: [],
    tags: [].}
Constructs a pen from color, width, and style.
proc init(self: wPen; hPen: HANDLE) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Pen(hPen: HANDLE): wPen {...}{.inline, raises: [], tags: [].}
Construct wPen object from a system pen handle.
proc init(self: wPen; pen: wPen) {...}{.validate, raises: [], tags: [].}
Initializer.
proc Pen(pen: wPen): wPen {...}{.inline, raises: [], tags: [].}
Copy constructor
proc getColor(self: wPen): wColor {...}{.validate, property, inline, raises: [], tags: [].}
Returns a reference to the pen color.
proc getStyle(self: wPen): DWORD {...}{.validate, property, inline, raises: [], tags: [].}
Returns the pen style.
proc getWidth(self: wPen): int {...}{.validate, property, inline, raises: [], tags: [].}
Returns the pen width.
proc setColor(self: wPen; color: wColor) {...}{.validate, property, raises: [], tags: [].}
Set the pen color.
proc setStyle(self: wPen; style: DWORD) {...}{.validate, property, raises: [], tags: [].}
Set the pen style.
proc setWidth(self: wPen; width: int) {...}{.validate, property, raises: [], tags: [].}
Sets the pen width.