ZoomLayout()
Summary
Changes the layout scale by a factor.
Syntax
ZoomLayout(string layout_name, real factor)
| Argument | Contents |
|---|---|
| layout_name | The name of the layout, or null for the current layout |
| factor | The factor by which to zoom |
Notes
-
Use ZoomLayout() with ClickCoord() to zoom in or out on a layout by a fixed ratio.
Example
// This macro doubles the layout scale at a point where the user clicks
c = ClickCoord()
CenterLayout(, c)
ZoomLayout(, 2.0)
Error Codes
| Error Type | Meaning |
|---|---|
| NotFound | There is no layout of the given name, or layout_name is null and there is no layout window |
See Also
| Function | Summary |
|---|---|
| CenterLayout() | Centers a layout at a specific point |
| SetVisibleRectangle() | Controls the portion of a layout that is displayed in a layout window. |