How can I control the size of my drawing using a Variable?

How can I control the size of my drawing using a Variable?

Frame Tool

Frame is a special rectangular object that you can place onto your canvas. When the frame resizes, all shapes that are inside the frame automatically move and resize with it. You can configure the resizing behavior of the shapes inside the frame using the resizing constraints.

Frames can be used in tandem with variables. When you connect a variable to the "Width" or "Height" property of the Frame, all changes of such variable will affect the size of the frame, as well as all shapes inside it.

Please, check out the "Example.pcvd" document and the "BlueRectFramed" canvas in the "Basic" tab. Also, take a look at example project.

For Implementation details check out the EXBasicViewOne class. See Dynamic Shapes for more information.

Group / Shape

When you connect a variable to the "Width" or "Height" property of Group or Shape in Inspector, all changes of the variable also affect the size of the Group or Shape.

Transform

When you connect a variable to the "Scale X" or "Scale Y" property of a shape or group in the Inspector, all changes of the variable will affect the scale of connected shape or group.

There are some limitations when combining frames and variables for resizing purposes, see: Dynamic shapes and transformations.