Scale Method
Class THtml5Canvas2D
procedure Scale(Width: Double; Height: Double);
The Scale method scales the current drawing, bigger or smaller.
Note:
If you scale a drawing, all future drawings will also be scaled. The positioning will also be scaled. If you scale(2,2); drawings will be positioned twice as far from the left and top of the canvas as you specify.
Parameter Values
Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)
Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.).
Examples:
Draw a rectangle, scale to 200%, then draw rectangle again:
Canvas.StrokeRect(5,5,25,15);
Canvas.Scale(2,2);
Canvas.StrokeRect(5,5,25,15);
Draw a rectangle, scale to 200%, draw rectangle again, scale to 200%, draw rectangle again, scale to 200%, draw rectangle again:
Canvas.StrokeRect(5,5,25,15);
Canvas.Scale(2,2);
Canvas.StrokeRect(5,5,25,15);
Canvas.Scale(2,2);
Canvas.StrokeRect(5,5,25,15);
Canvas.Scale(2,2);
Canvas.StrokeRect(5,5,25,15);