Expose methods for screen-space transforms

This commit is contained in:
kobewi 2022-03-13 16:02:24 +01:00
parent c8fce1661d
commit bcf13dc175
5 changed files with 23 additions and 1 deletions

View file

@ -355,6 +355,13 @@
Returns the mouse's position in this [CanvasItem] using the local coordinate system of this [CanvasItem].
</description>
</method>
<method name="get_screen_transform" qualifiers="const">
<return type="Transform2D" />
<description>
Returns the transform of this [CanvasItem] in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins.
Equals to [method get_global_transform] if the window is embedded (see [member Viewport.gui_embed_subwindows]).
</description>
</method>
<method name="get_transform" qualifiers="const">
<return type="Transform2D" />
<description>