A brush is a drawing tool for filling in areas.
Consts: | Font Family | Description |
wBrushStyleSolid | Solid. |
wBrushStyleTransparent | Transparent (no fill). |
wBrushStyleMask | Brush style mask. |
wBrushStyleBdiagonalHatch | Backward diagonal hatch. |
wBrushStyleCrossdiagHatch | Cross-diagonal hatch. |
wBrushStyleFdiagonalHatch | Forward diagonal hatch. |
wBrushStyleCrossHatch | Cross hatch. |
wBrushStyleHorizontalHatch | Horizontal hatch. |
wBrushStyleVerticalHatch | Vertical hatch. |
wBrushStyleMaskHatch | Brush hatch style mask. |
|
proc init(self: wBrush; lb: var LOGBRUSH) {...}{.raises: [wBrushError], tags: [].}
-
Initializes a brush from LOGBRUSH struct. Used internally.
proc Brush(lb: var LOGBRUSH): wBrush {...}{.inline, discardable, raises: [wBrushError],
tags: [].}
-
Constructor.
proc init(self: wBrush; color: wColor = wWHITE; style = wBrushStyleSolid) {...}{.
raises: [wBrushError], tags: [].}
-
Initializes a brush from a color and style.
proc Brush(color: wColor = wWHITE; style = wBrushStyleSolid): wBrush {...}{.inline,
discardable, raises: [wBrushError], tags: [].}
-
Constructor.
proc init(self: wBrush; hBrush: HANDLE; copy = true; shared = false) {...}{.
raises: [wBrushError], tags: [].}
-
Initializes a brush from system brush handle. If copy is false, the function only wrap the handle to wBrush object. If shared is false, the handle will be destroyed together with wBrush object by the GC. Otherwise, the caller is responsible for destroying it.
proc Brush(hBrush: HANDLE; copy = true; shared = false): wBrush {...}{.inline, discardable,
raises: [wBrushError], tags: [].}
-
Constructor.
proc init(self: wBrush; brush: wBrush) {...}{.raises: [wBrushError], tags: [].}
-
Initializes a brush from a wBrush object, aka. copy.
proc Brush(brush: wBrush): wBrush {...}{.inline, discardable, raises: [wBrushError], tags: [].}
-
Constructor.
proc getColor(self: wBrush): wColor {...}{.inline, raises: [], tags: [].}
-
Returns a reference to the brush color.
proc getStyle(self: wBrush): DWORD {...}{.inline, raises: [], tags: [].}
-
Returns the brush style.
proc setColor(self: wBrush; color: wColor) {...}{.raises: [wBrushError], tags: [].}
-
Sets the brush color.
proc setStyle(self: wBrush; style: DWORD) {...}{.raises: [wBrushError], tags: [].}
-
Sets the brush style.
template wBlackBrush(): untyped
-
Predefined black brush. Don't delete.
template wWhiteBrush(): untyped
-
Predefined white brush. Don't delete.
template wGreyBrush(): untyped
-
Predefined grey brush. Don't delete.
template wTransparentBrush(): untyped
-
Predefined transparent brush. Don't delete.
template wLightGreyBrush(): untyped
-
Predefined light grey brush. Don't delete.
template wMediumGreyBrush(): untyped
-
Predefined medium grey brush. Don't delete.
template wBlueBrush(): untyped
-
Predefined blue brush. Don't delete.
template wGreenBrush(): untyped
-
Predefined green brush. Don't delete.
template wCyanBrush(): untyped
-
Predefined cyan brush. Don't delete.
template wRedBrush(): untyped
-
Predefined red brush. Don't delete.
template wDefaultBrush(): untyped
-
Predefined default (white) brush. Don't delete.