Class ColorBuffer

java.lang.Object
de.pianoman911.mapengine.api.util.ColorBuffer

public class ColorBuffer extends Object
Color buffer used for wrapping minecraft color space data.
  • Constructor Details

    • ColorBuffer

      public ColorBuffer(byte[] data, int width, int height)
      Wraps the given minecraft map color data into an object.
      Parameters:
      data - initial data
      width - the width of the buffer, must match the data
      height - the height of the buffer, must match the data
    • ColorBuffer

      @Deprecated public ColorBuffer(int size, int width, int height)
      Deprecated.
      should not be used for creation, use ColorBuffer(int, int) instead
      Creates a new color buffer with the given size.
      Parameters:
      width - the width of the buffer, must be compatible with the size
      height - the height of the buffer, must be compatible with the size
    • ColorBuffer

      public ColorBuffer(int width, int height)
      Creates a new color buffer from with the given width and height.
      Parameters:
      width - the width of the buffer
      height - the height of the buffer
  • Method Details

    • data

      public final byte[] data()
      Returns:
      the raw color data wrapped by this buffer, mutable
    • size

      public final int size()
      Returns:
      the internal length of the data
    • width

      public final int width()
      Returns:
      the width in pixels
    • height

      public final int height()
      Returns:
      the height in pixels