Documentation/GdiBrush
classWORKERCLONEABLE

GdiBrush

js/foo_uie_jsplitter.js:6670
GdiBrush(arg)

Object used for drawing as alternative for simple colour.
Can also be used to reuse brushes for drawing instead of creating them every time for any primitive drawing operation (if just a color is specified in the Draw/Fill methods, a brush is always created).
Created by gdi.Brush

Parameters

NameTypeDescription
argGdiBrush

Example source

propertyWORKERreadonly

Type

js/foo_uie_jsplitter.js:6682
Type: BrushType

Brush type.
See BrushType

propertyWORKERreadonly

WrapMode

js/foo_uie_jsplitter.js:6691
WrapMode: BrushWrapMode

Wrap mode responsible for how the brush gradient or image is repeated when drawing
See BrushWrapMode

methodWORKER

ApplyTransform

js/foo_uie_jsplitter.js:6783
ApplyTransform(matrix)

Applies specified transformation matrix of 3x2 size to the current GdiBrush matrix.
Matrix3x2 helper class from the component/docs/Matrix.js will be useful

Parameters

NameTypeDescription
matrixFloat32Array

Array that presents 3x2 matrix for transformation (length = 6)

Example source

methodWORKER

GetTransform

js/foo_uie_jsplitter.js:6757
GetTransform()

Gets GdiBrush current transformation matrix of 3x2 size (Float32Array(6))
Matrix3x2 helper class from the component/docs/Matrix.js will be useful

Returns

Float32Array

Example source

methodWORKER

PopTransform

js/foo_uie_jsplitter.js:6751
PopTransform()

Restores GdiBrush matrix from internal stack pushed previously by PushTransform.

methodWORKER

PushTransform

js/foo_uie_jsplitter.js:6745
PushTransform()

Saves current GdiBrush matrix in internal stack. To restore the matrix use PopTransform.

methodWORKER

ResetTransform

js/foo_uie_jsplitter.js:6777
ResetTransform()

Resets current GdiBrush matrix to original identity matrix.

methodWORKER

Rotate

js/foo_uie_jsplitter.js:6710
Rotate(angle, cx, cy)

Applies rotation matrix to the current GdiBrush matrix.
For more information see https://learn.microsoft.com/en-us/windows/win32/api/d2d1helper/nf-d2d1helper-matrix3x2f-rotation

Parameters

NameTypeDescription
anglefloat

Angle of rotation in degrees

cx = 0optionalnumber

Rotation center point x coord

cy = 0optionalnumber

Rotation center point y coord

methodWORKER

Scale

js/foo_uie_jsplitter.js:6721
Scale(sz, sy, cx, cy)

Parameters

NameTypeDescription
sxfloat

The x-axis scale factor

sy = 0optionalfloat

The y-axis scale factor. If zero sx will be used as sy

cx = 0optionalnumber

Scale center point x coord

cy = 0optionalnumber

Scale center point y coord

methodWORKER

SetTransform

js/foo_uie_jsplitter.js:6767
SetTransform(matrix)

Replaces the current GdiBrush matrix with specified transformation matrix of 3x2 size.
Matrix3x2 helper class from the component/docs/Matrix.js will be useful

Parameters

NameTypeDescription
matrixFloat32Array

Array that presents 3x2 matrix for transformation (length = 6)

Example source

methodWORKER

Skew

js/foo_uie_jsplitter.js:6733
Skew(angleX, angleY, cx, cy)

Applies skew matrix to the current GdiBrush matrix.
For more information see https://learn.microsoft.com/en-us/windows/win32/api/d2d1helper/nf-d2d1helper-matrix3x2f-skew

Parameters

NameTypeDescription
angleXfloat

The x-axis skew angle, which is measured in degrees counterclockwise from the y-axis.

angleYfloat

The y-axis skew angle, which is measured in degrees clockwise from the x-axis.

cx = 0optionalnumber

Skew center point x coord

cy = 0optionalnumber

Skew center point y coord

methodWORKER

Translate

js/foo_uie_jsplitter.js:6700
Translate(dx, dy)

Applies translation matrix to the current GdiBrush matrix.
For more information see https://learn.microsoft.com/en-us/windows/win32/api/d2d1helper/nf-d2d1helper-matrix3x2f-translation(d2d1_size_f)

Parameters

NameTypeDescription
dxnumber
dynumber