Name
PerspectiveDistortBrush -- apply perspective distortion to brush (V5.0)
Synopsis
PerspectiveDistortBrush(id,cx1,cy1,cx2,cy2,cx3,cy3,cx4,cy4[,smooth])
Function
This command can be used to apply perspective distortion to the brush specified in id. You have to pass 4 control points that describe a quadrangle into which the brush shall be mapped. The optional argument smooth can be used to enable antialiased pixel interpolation which leads to a smoother appearance but takes longer to calculate.

The control point mapping is as follows: The top-left corner of the brush is mapped to control point 1, the top-right corner is mapped to control point 2, the bottom-right corner to control point 3, and the bottom-left corner to control point 4.

Inputs
id
brush that shall be distorted
cx1
x coordinate of control point 1
cy1
y coordinate of control point 1
cx2
x coordinate of control point 2
cy2
y coordinate of control point 2
cx3
x coordinate of control point 3
cy3
y coordinate of control point 3
cx4
x coordinate of control point 4
cy4
y coordinate of control point 4
smooth
optional: whether or not anti-aliased distortion shall be used (defaults to False)
Example
PerspectiveDistortBrush(1, 100, 0, 400, 0, 500, 300, 0, 300)
The code above maps brush 1 into a trapezoid shape.

Show TOC