@NoOffset @Properties(inherit=ale.class) public class ColourPalette extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
ColourPalette() |
ColourPalette(long size)
Native array allocator.
|
ColourPalette(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyPaletteGrayscale(byte[] dst_buffer,
byte[] src_buffer,
long src_size) |
void |
applyPaletteGrayscale(ByteBuffer dst_buffer,
ByteBuffer src_buffer,
long src_size) |
void |
applyPaletteGrayscale(BytePointer dst_buffer,
BytePointer src_buffer,
long src_size)
Applies the current grayscale palette to the src_buffer and returns the results in dst_buffer
For each byte in src_buffer, a single byte is returned in dst_buffer
8 bits => 8 bits
|
void |
applyPaletteRGB(byte[] dst_buffer,
byte[] src_buffer,
long src_size) |
void |
applyPaletteRGB(ByteBuffer dst_buffer,
ByteBuffer src_buffer,
long src_size) |
void |
applyPaletteRGB(BytePointer dst_buffer,
BytePointer src_buffer,
long src_size)
Applies the current RGB palette to the src_buffer and returns the results in dst_buffer
For each byte in src_buffer, three bytes are returned in dst_buffer
8 bits => 24 bits
|
byte |
getGrayscale(int val)
Returns the byte-sized grayscale value for this palette index.
|
ColourPalette |
getPointer(long i) |
int |
getRGB(int val)
Converts a given palette value into packed RGB (format 0x00RRGGBB).
|
void |
getRGB(int val,
int[] r,
int[] g,
int[] b) |
void |
getRGB(int val,
IntBuffer r,
IntBuffer g,
IntBuffer b) |
void |
getRGB(int val,
IntPointer r,
IntPointer g,
IntPointer b)
Converts a given palette value in range [0, 255] into its RGB components.
|
void |
loadUserPalette(BytePointer paletteFile)
Loads a user-defined palette file (from OSystem::paletteFile), filling the
appropriate user-defined palette arrays.
|
void |
loadUserPalette(String paletteFile) |
ColourPalette |
position(long position) |
void |
setPalette(BytePointer type,
BytePointer displayFormat)
Loads all defined palettes with PAL color-loss data depending
on 'state'.
|
void |
setPalette(String type,
String displayFormat) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic ColourPalette(Pointer p)
Pointer.Pointer(Pointer).public ColourPalette(long size)
Pointer.position(long).public ColourPalette()
public ColourPalette position(long position)
public ColourPalette getPointer(long i)
getPointer in class Pointerpublic void getRGB(int val,
@ByRef
IntPointer r,
@ByRef
IntPointer g,
@ByRef
IntPointer b)
@Cast(value="uInt32") public int getRGB(int val)
@Cast(value="uInt8") public byte getGrayscale(int val)
public void applyPaletteRGB(@Cast(value="uInt8*") BytePointer dst_buffer, @Cast(value="uInt8*") BytePointer src_buffer, @Cast(value="size_t") long src_size)
public void applyPaletteRGB(@Cast(value="uInt8*") ByteBuffer dst_buffer, @Cast(value="uInt8*") ByteBuffer src_buffer, @Cast(value="size_t") long src_size)
public void applyPaletteRGB(@Cast(value="uInt8*") byte[] dst_buffer, @Cast(value="uInt8*") byte[] src_buffer, @Cast(value="size_t") long src_size)
public void applyPaletteGrayscale(@Cast(value="uInt8*") BytePointer dst_buffer, @Cast(value="uInt8*") BytePointer src_buffer, @Cast(value="size_t") long src_size)
public void applyPaletteGrayscale(@Cast(value="uInt8*") ByteBuffer dst_buffer, @Cast(value="uInt8*") ByteBuffer src_buffer, @Cast(value="size_t") long src_size)
public void applyPaletteGrayscale(@Cast(value="uInt8*") byte[] dst_buffer, @Cast(value="uInt8*") byte[] src_buffer, @Cast(value="size_t") long src_size)
public void setPalette(@StdString BytePointer type, @StdString BytePointer displayFormat)
type - The palette type = {standard, z26, user}displayFormat - The display format = { NTSC, PAL, SECAM }public void setPalette(@StdString String type, @StdString String displayFormat)
public void loadUserPalette(@StdString BytePointer paletteFile)
public void loadUserPalette(@StdString String paletteFile)
Copyright © 2020. All rights reserved.