Record Class GuiBorderImage

java.lang.Object
java.lang.Record
com.render.api.gui.paint.GuiBorderImage
Record Components:
image - source image
sliceTop - top slice relative to image height
sliceRight - right slice relative to image width
sliceBottom - bottom slice relative to image height
sliceLeft - left slice relative to image width
fillCenter - whether the center slice is painted
repeat - repetition along border edges

public record GuiBorderImage(GuiImage image, float sliceTop, float sliceRight, float sliceBottom, float sliceLeft, boolean fillCenter, GuiBackgroundRepeat repeat) extends Record
Reusable image sliced over a border.
  • Constructor Details

    • GuiBorderImage

      public GuiBorderImage(GuiImage image, float sliceTop, float sliceRight, float sliceBottom, float sliceLeft, boolean fillCenter, GuiBackgroundRepeat repeat)
      Creates an instance of a GuiBorderImage record class.
      Parameters:
      image - the value for the image record component
      sliceTop - the value for the sliceTop record component
      sliceRight - the value for the sliceRight record component
      sliceBottom - the value for the sliceBottom record component
      sliceLeft - the value for the sliceLeft record component
      fillCenter - the value for the fillCenter record component
      repeat - the value for the repeat record component
  • Method Details

    • uniform

      public static GuiBorderImage uniform(GuiImage image, float slice)
    • 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.
    • image

      public GuiImage image()
      Returns the value of the image record component.
      Returns:
      the value of the image record component
    • sliceTop

      public float sliceTop()
      Returns the value of the sliceTop record component.
      Returns:
      the value of the sliceTop record component
    • sliceRight

      public float sliceRight()
      Returns the value of the sliceRight record component.
      Returns:
      the value of the sliceRight record component
    • sliceBottom

      public float sliceBottom()
      Returns the value of the sliceBottom record component.
      Returns:
      the value of the sliceBottom record component
    • sliceLeft

      public float sliceLeft()
      Returns the value of the sliceLeft record component.
      Returns:
      the value of the sliceLeft record component
    • fillCenter

      public boolean fillCenter()
      Returns the value of the fillCenter record component.
      Returns:
      the value of the fillCenter record component
    • repeat

      public GuiBackgroundRepeat repeat()
      Returns the value of the repeat record component.
      Returns:
      the value of the repeat record component