 |
 |
 |
 |
Name |
|
scale() |
 |
|
|
Examples |
|
 |
rect(30, 20, 50, 50);
scale(0.5);
rect(30, 20, 50, 50);
|
 |
 |
rect(30, 20, 50, 50);
scale(0.5, 1.3);
rect(30, 20, 50, 50);
|
 |
|
Description |
|
Increasing and decreasing the size of an object by expanding and contracting vertices. Scale values are specified as decimal percentages. The function call scale(2.0) will increase the dimension of a shape by two hundred percent. Objects always scale from their relative origin to the coordinate system. |
 |
|
|
Syntax |
|
scale(size);
scale(x, y);
scale(x, y, z);
|
 |
|
|
Parameters |
|
size |
|
float: percentage to scale the object
|
x |
|
float: percentage to scale the object in the "x" axis
|
y |
|
float: percentage to scale the object in the "y" axis
|
z |
|
float: percentage to scale the object in the "z" axis
|
|
 |
|
|
Returns |
|
None |
 |
|
|
Usage |
|
Web & Application |
 |
|
|
Related |
|
translate() rotate() rotateX() rotateY() rotateZ() scale() push() pop() |
|