User Guide
Using Matrix objects 427
The following examples show the effects on a green-to-blue linear gradient in which the
rotation, tx, and ty parameters of the createGradientBox() method differ as indicated,
but all other settings stay the same:
The width, height, tx, and ty parameters of the createGradientBox() method affect the
size and position of a radial gradient fill as well, as the following example shows:
width = 50;
height = 100;
rotation = 0;
tx = 0;
ty = 0;
width = 50;
height = 100;
rotation = 0
tx = 50;
ty = 0;
width = 100;
height = 50;
rotation = Math.PI/2; // 90°
tx = 0;
ty = 0;
width = 100;
height = 50;
rotation = Math.PI/2; // 90°
tx = 0;
ty = 50;
width = 50;
height = 100;
rotation = 0;
tx = 25;
ty = 0;