Class ColorBuffer
java.lang.Object
de.pianoman911.mapengine.api.util.ColorBuffer
Color buffer used for wrapping minecraft color space data.
-
Constructor Summary
ConstructorsConstructorDescriptionColorBuffer
(byte[] data, int width, int height) Wraps the given minecraft map color data into an object.ColorBuffer
(int width, int height) Creates a new color buffer from with the given width and height.ColorBuffer
(int size, int width, int height) Deprecated. -
Method Summary
-
Constructor Details
-
ColorBuffer
public ColorBuffer(byte[] data, int width, int height) Wraps the given minecraft map color data into an object.- Parameters:
data
- initial datawidth
- the width of the buffer, must match the dataheight
- the height of the buffer, must match the data
-
ColorBuffer
Deprecated.should not be used for creation, useColorBuffer(int, int)
insteadCreates a new color buffer with the given size.- Parameters:
width
- the width of the buffer, must be compatible with the sizeheight
- 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 bufferheight
- 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
-
ColorBuffer(int, int)
instead