def xform(self, v): if isinstance(v, Vector2): raw = lib.godot_transform2d_xform_vector2(self._gd_ptr, v._gd_ptr) return Vector2.build_from_gdobj(raw) elif isinstance(v, Rect2): raw = lib.godot_transform2d_xform_rect2(self._gd_ptr, v._gd_ptr) return Rect2.build_from_gdobj(raw) raise TypeError('Param `v` should be of type `Rect2` or `Vector2`')
def get_scale(self): raw = lib.godot_transform2d_get_scale(self._gd_ptr) return Vector2.build_from_gdobj(raw)
def size(self): return Vector2.build_from_gdobj(lib.godot_rect2_get_size(self._gd_ptr))
def basis_xform_inv(self, v): self._check_param_type('v', v, Vector2) raw = lib.godot_transform2d_basis_xform_inv_vector2( self._gd_ptr, v._gd_ptr) return Vector2.build_from_gdobj(raw)
def position(self): return Vector2.build_from_gdobj( lib.godot_rect2_get_position(self._gd_ptr))