PatternImageStretch
Typeobject
Backlinks1Use an image as the content of the pattern. The pattern type is stretch.
Property | Type | Required |
---|---|---|
class | string | Required |
imageFileName | string | Required |
matrix | Matrix | Required |
imageFilters | ImageFilters | Optional |
class​
RequiredType
string
Value
constant: the value of this property must be equal to:
"patternImageStretch"
matrix​
RequiredDescription
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