Record Class PremultipliedRgba8Image

java.lang.Object
java.lang.Record
org.maplibre.nativeffi.render.PremultipliedRgba8Image

public record PremultipliedRgba8Image(int width, int height, int stride, byte[] pixels) extends Record
Caller-owned premultiplied RGBA8 pixels.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PremultipliedRgba8Image(int width, int height, int stride, byte[] pixels)
    Creates an instance of a PremultipliedRgba8Image record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    int
    Returns the value of the height record component.
    byte[]
    Returns the value of the pixels record component.
    int
    Returns the value of the stride record component.
    Returns a string representation of this record class.
    int
    Returns the value of the width record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PremultipliedRgba8Image

      public PremultipliedRgba8Image(int width, int height, int stride, byte[] pixels)
      Creates an instance of a PremultipliedRgba8Image record class.
      Parameters:
      width - the value for the width record component
      height - the value for the height record component
      stride - the value for the stride record component
      pixels - the value for the pixels record component
  • Method Details

    • pixels

      public byte[] pixels()
      Returns the value of the pixels record component.
      Returns:
      the value of the pixels record component
    • equals

      public boolean equals(Object other)
      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:
      other - the object with which to compare
      Returns:
      true if this object is the same as the other argument; false otherwise.
    • hashCode

      public 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
    • toString

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

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

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • stride

      public int stride()
      Returns the value of the stride record component.
      Returns:
      the value of the stride record component