From Xojo Documentation


Graphics.Scale(x As Double, y As Double)

New in 2021r1

Supported for all project types and targets.

Sets the scale for the graphics context as specified scaleX and scaleY. This only affects subsequent drawing. Any drawing done before the Scale method is called is not scaled.

Sample Code

From within the MobileCanvas.Paint event handler:

g.Scale(2.0, 4.0)
g.DrawingColor = Color.Blue
g.FillRectangle(10, 10, 10, 10) // The squares scales to a rectangle