December 2010
Intermediate to advanced
110 pages
2h 31m
English
CRC.scale() — adds a scaling operation to the current transform
void scale(floatsx, floatsy)
sx, syThe horizontal and vertical scaling factors
scale() adds a scale transformation to the
current transformation matrix of the canvas. Scaling is done with
independent horizontal and vertical scaling factors. For example,
passing the values 2.0 and 0.5 causes subsequently drawn paths to be
twice as wide and half as high as they would otherwise have been.
Specifying a negative value for sx causes X
coordinates to be flipped across the Y axis, and a negative value of
sy causes Y coordinates to be flipped across
the X axis.
Read now
Unlock full access