Canvas (aka model panel) is the center stage. Model creation and visualization take place in the canvas.
Mekanimo employs a scrollable canvas window which provides a more flexible user interface than a fixed sized window. The limits of the scrollable area (virtual area) is determined by the virtual size of the canvas. The default virtual size is 40,000 pixels by 30,000 pixels. The virtual size can be manipulated by setting the canvas.virtualSize as shown below.
>>> canvas.virtualSize = (120000, 30000)
Note
If you would like to change the virtual size Mekanimo uses when it starts up, you can add a line specifying the desired size to the mekanimo_startup.py file located in the installation directory.
Origin of the global coordinates is located at the center of the canvas’ virtual area (defined by canvas.virtualSize as explained above) by default. For convenience Mekanimo scrolls the canvas so that the global coordinates system is displayed on the bottom left corner.
The position of the mouse cursor (in global coordinates) is displayed in the status bar. It is possible to scroll the canvas by using the scroll bars or the arrow keys (you can also pan the canvas by dragging the mouse while holding the space key).
In addition to the global coordinates there are two other pixel based coordinate system: Canvas coordinates and screen coordinates.
See also
Objects displayed in the canvas can be scaled by using the zoom-in, zoom-out options or from the Python interpreter by specifying the scale factor as shown below.
>>> canvas.setScale(.5)
Grid can be used to help aligning objects in the canvas. Grid and snap-to-grid options can be turned on/off from the menus, toolbar, or the Python interpreter as shown below:
>>> canvas.showGrid = True
>>> canvas.snapToGrid = True
Note
If you would like to change the default grid and snap-to-grid options Mekanimo uses when it starts up, you can add a line specifying the desired option in the mekanimo_startup.py file.
Canvas background color is white by default. Background color can be changed from Settings -> Background color menu or from the interpreter as shown below.
>>> canvas.setBackgroundColor(color.green)
or
>>> canvas.setBackgroundColor((150, 200, 100))
If you would like to change the default background color, you can add the line shown below with the color you desire to the mekanimo_startup.py file.
canvas.setBackgroundColor(color.navyblue)