Class GuiTransform
java.lang.Object
com.render.api.gui.effects.GuiTransform
Immutable ordered component-transform list.
The compositor resolver executes affine and perspective 3D transforms. A
transformed component is represented by the projective homography produced
by intersecting its local z=0 plane with the GUI viewport.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResolved CSS-compatible 2D affine matrix.static final recordResolved portable axis-aligned transform used by paint and input.static final recordCSS-compatible 2D matrix usingx' = a*x + c*y + txandy' = b*x + d*y + ty.static interfaceOne transform operation in the authored list.static final recordstatic final recordstatic final recordInvertible 2D homography used for perspective paint and hit testing.static final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final record -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisNone()static GuiTransformof(GuiTransform.Operation... operations) resolveAffine(GuiRect reference, GuiTransformOrigin origin) Resolves this list against a reference box as an invertible 2D affine transform.resolveAxisAligned(GuiRect reference, GuiTransformOrigin origin) Resolves this list against a reference box and returns a portable axis-aligned transform when possible.resolveProjective(GuiRect reference, GuiTransformOrigin origin) Resolves this transform list to an invertible projective mapping of the component plane.static GuiTransformrotate(float degrees) static GuiTransformscale(float scale) static GuiTransformscale(float x, float y) then(GuiTransform.Operation operation) static GuiTransformtranslate(float x, float y)
-
Field Details
-
NONE
-
-
Constructor Details
-
GuiTransform
-
-
Method Details
-
of
-
translate
-
scale
-
scale
-
rotate
-
then
-
operations
-
isNone
public boolean isNone() -
resolveAxisAligned
public Optional<GuiTransform.AxisAligned> resolveAxisAligned(GuiRect reference, GuiTransformOrigin origin) Resolves this list against a reference box and returns a portable axis-aligned transform when possible.- Parameters:
reference- transform reference boxorigin- normalized transform origin- Returns:
- resolved transform, or empty for a non-axis-aligned/3D matrix
-
resolveAffine
Resolves this list against a reference box as an invertible 2D affine transform.- Parameters:
reference- transform reference boxorigin- normalized transform origin- Returns:
- resolved affine transform, or empty for perspective/non-planar 3D
-
resolveProjective
public Optional<GuiTransform.Projective> resolveProjective(GuiRect reference, GuiTransformOrigin origin) Resolves this transform list to an invertible projective mapping of the component plane.- Parameters:
reference- transform reference boxorigin- normalized transform origin- Returns:
- resolved homography, or empty for a singular/non-finite mapping
-