Record Class GuiPaintWorkletContext

java.lang.Object
java.lang.Record
com.render.api.gui.paint.GuiPaintWorkletContext
Record Components:
width - paint width in design pixels
height - paint height in design pixels
deviceScale - physical pixels per design pixel
states - component-defined immutable state flags
properties - declared immutable input values
timeSeconds - retained animation time

public record GuiPaintWorkletContext(float width, float height, float deviceScale, Map<String,Boolean> states, Map<String,Object> properties, double timeSeconds) extends Record
Immutable worklet input snapshot.
  • Constructor Details

    • GuiPaintWorkletContext

      public GuiPaintWorkletContext(float width, float height, float deviceScale, Map<String,Boolean> states, Map<String,Object> properties, double timeSeconds)
      Creates an instance of a GuiPaintWorkletContext record class.
      Parameters:
      width - the value for the width record component
      height - the value for the height record component
      deviceScale - the value for the deviceScale record component
      states - the value for the states record component
      properties - the value for the properties record component
      timeSeconds - the value for the timeSeconds record component
  • Method Details

    • 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.
    • width

      public float width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public float height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • deviceScale

      public float deviceScale()
      Returns the value of the deviceScale record component.
      Returns:
      the value of the deviceScale record component
    • states

      public Map<String,Boolean> states()
      Returns the value of the states record component.
      Returns:
      the value of the states record component
    • properties

      public Map<String,Object> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • timeSeconds

      public double timeSeconds()
      Returns the value of the timeSeconds record component.
      Returns:
      the value of the timeSeconds record component