Record Class GuiMotionPath
java.lang.Object
java.lang.Record
com.render.api.gui.effects.GuiMotionPath
- Record Components:
path- SVG-compatible path datadistance- normalized progress along the pathanchorX- normalized component anchor XanchorY- normalized component anchor Yrotation- rotation behaviorrotationDegrees- fixed/additional rotation
public record GuiMotionPath(String path, float distance, float anchorX, float anchorY, GuiMotionPath.Rotation rotation, float rotationDegrees)
extends Record
Immutable motion-path declaration.
The portable compositor path executes SVG path commands M/m,
L/l, H/h, V/v, C/c, S/s,
Q/q, T/t, A/a, and Z/z. Curves are
flattened adaptively in design space before distance sampling, which keeps
auto-rotation tangent to the painted path.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGuiMotionPath(String path, float distance, float anchorX, float anchorY, GuiMotionPath.Rotation rotation, float rotationDegrees) Creates an instance of aGuiMotionPathrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatanchorX()Returns the value of theanchorXrecord component.floatanchorY()Returns the value of theanchorYrecord component.floatdistance()Returns the value of thedistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisNone()path()Returns the value of thepathrecord component.resolveAffine(GuiRect reference) Resolves the sampled path position and orientation as a component affine transform.rotation()Returns the value of therotationrecord component.floatReturns the value of therotationDegreesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NONE
-
-
Constructor Details
-
GuiMotionPath
public GuiMotionPath(String path, float distance, float anchorX, float anchorY, GuiMotionPath.Rotation rotation, float rotationDegrees) Creates an instance of aGuiMotionPathrecord class.- Parameters:
path- the value for thepathrecord componentdistance- the value for thedistancerecord componentanchorX- the value for theanchorXrecord componentanchorY- the value for theanchorYrecord componentrotation- the value for therotationrecord componentrotationDegrees- the value for therotationDegreesrecord component
-
-
Method Details
-
isNone
public boolean isNone() -
resolveAffine
Resolves the sampled path position and orientation as a component affine transform.- Parameters:
reference- component reference box- Returns:
- sampled transform, or empty for unsupported/invalid path data
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
path
-
distance
-
anchorX
-
anchorY
-
rotation
-
rotationDegrees
public float rotationDegrees()Returns the value of therotationDegreesrecord component.- Returns:
- the value of the
rotationDegreesrecord component
-