S or /

SourceClass RectTransform

from egui import RectTransform
class RectTransform:

Linearly transforms positions from one Rect to another.

RectTransform stores the rectangles, and therefore supports clamping and culling.

Properties§

@property def from_rect(self, /) -> Rect§
@property def to_rect(self, /) -> Rect§

Methods§

Source@staticmethod def from_to(from: Rect, to: Rect) -> RectTransform§
Source@staticmethod def identity(from_and_to: Rect) -> RectTransform§
Sourcedef inverse(self, /) -> RectTransform§
Sourcedef scale(self, /) -> Vec2§

The scale factors.

Sourcedef transform_pos(self, /, pos: Pos2) -> Pos2§

Transforms the given coordinate in the from space to the to space.

Sourcedef transform_pos_clamped(self, /, pos: Pos2) -> Pos2§

Transforms the given coordinate in the from space to the to space, clamping if necessary.

Sourcedef transform_rect(self, /, rect: Rect) -> Rect§

Transforms the given rectangle in the in-space to a rectangle in the out-space.