Skip to main content

PatternImageStretch

Typeobject
Backlinks1

Use an image as the content of the pattern. The pattern type is stretch.

PropertyTypeRequired
classstringRequired
imageFileNamestringRequired
matrixMatrixRequired
imageFiltersImageFiltersOptional

class​

Required

Type

string

Value

constant: the value of this property must be equal to:

"patternImageStretch"

imageFileName​

Required

Description

File name of the image.

Type

string

matrix​

Required

Description

Image matrix. Let the width and height of the widget be w and h, the width and height of the image be iw and ih. Define Mw = [[w, 0, 0], [0, h, 0], [0, 0, 1]], and Mi = [[1 / iw, 0, 0], [0, 1 / ih, 0], [0, 0, 1]]. Finally, apply the Mw * matrix * Mi * P transformation to each of the four vertices of the image (0, 0), (0, iw), (iw, -ih), (0, -ih), where P represents a vertex of the image, to obtain the position of the image in the widget coordinate system.

Type

Matrix

imageFilters​

Optional

Description

Adjust the colors of the image.