ZoomableView¶
-
class
guerilla.
ZoomableView
¶ Bases:
guerilla.Window
A zoomable layout
-
getnodepath
()¶ Returns the edited node path (is nil if the method is not supported)
Returns: The path to the edited node Return type: str
-
getvirtualrect
()¶ Get the view coordinates in the virtual node space. This space is the same than the Node.NodePos plug.
Returns: The current left, right, top and bottom virtual coordinate of the view Return type: number,number,number,number
-
getzoompos
()¶ Get the zoom and display origin of the ZoomableView
Returns: The current zoom and origin of the ZoomableView Return type: number,number,number
-
setzoompos
(zoom, x, y)¶ Change the zoom and display origin of the ZoomableView
Parameters: - zoom (number) – the new zoom
- x (number) – the X coordinate of the left border of the ZoomableView
- y (number) – the Y coordinate of the top border of the ZoomableView
-
tozoomable
(x, y)¶ Transform a couple of window coordinates to the ZoomableView virtual node coordinates. This space is the same than the Node.NodePos plug.
Parameters: - x (number) – The window X coordinate
- y (number) – The window Y coordinate
Returns: The input coordinates in ZoomableView space
Return type: number,number
-