Record Class GuiMotionPath

java.lang.Object
java.lang.Record
com.render.api.gui.effects.GuiMotionPath
Record Components:
path - SVG-compatible path data
distance - normalized progress along the path
anchorX - normalized component anchor X
anchorY - normalized component anchor Y
rotation - rotation behavior
rotationDegrees - 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.

  • Field Details

  • Constructor Details

    • GuiMotionPath

      public GuiMotionPath(String path, float distance, float anchorX, float anchorY, GuiMotionPath.Rotation rotation, float rotationDegrees)
      Creates an instance of a GuiMotionPath record class.
      Parameters:
      path - the value for the path record component
      distance - the value for the distance record component
      anchorX - the value for the anchorX record component
      anchorY - the value for the anchorY record component
      rotation - the value for the rotation record component
      rotationDegrees - the value for the rotationDegrees record component
  • Method Details

    • isNone

      public boolean isNone()
    • resolveAffine

      public Optional<GuiTransform.Affine> resolveAffine(GuiRect reference)
      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

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • distance

      public float distance()
      Returns the value of the distance record component.
      Returns:
      the value of the distance record component
    • anchorX

      public float anchorX()
      Returns the value of the anchorX record component.
      Returns:
      the value of the anchorX record component
    • anchorY

      public float anchorY()
      Returns the value of the anchorY record component.
      Returns:
      the value of the anchorY record component
    • rotation

      public GuiMotionPath.Rotation rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component
    • rotationDegrees

      public float rotationDegrees()
      Returns the value of the rotationDegrees record component.
      Returns:
      the value of the rotationDegrees record component