Cel
ase.Cel (Class)
Instance Members
chunk: ase.chunks.CelChunkpixelData: haxe.io.BytesUncompressed Bytes representing pixels of the Cel.
- 32 bit ARGB value per pixel for 32 bit color depth
- 16 bit greyscale value 0x0000 = black, 0xffff = white
- 8 bit index value per pixel for Indexed
pixelDataLength: IntRequired length of the data in bytes. Always equals to width x height x (bpp / 8)
width: IntCel width
height: IntCel height
layerIndex: IntLayer index
xPosition: IntCel x position
yPosition: IntCel y position
Initalize Cel pixel data
| Name | Type | Description |
|---|---|---|
width |
Int | @param height |
height |
Int |
| Name | Type |
|---|---|
argb |
Int |
| Name | Type |
|---|---|
index |
Int |
Get pixel color or color index at given position
| Name | Type |
|---|---|
px |
Int |
py |
Int |
| Returns |
|---|
| Null<Int> |
Set pixel color or color index at given position
| Name | Type | Description |
|---|---|---|
px |
Int | x |
py |
Int | y |
color |
Int | ARGB color for 32bpp mode, GGGG color for 16bpp mode and index or GG color for Indexed or 8bpp mode |
setPixelData(newData: haxe.io.Bytes, ?newWidth: Int, ?newHeight: Int): VoidSet new pixel data
| Name | Type | Default |
|---|---|---|
newData |
haxe.io.Bytes | |
newWidth |
Int | (optional) |
newHeight |
Int | (optional) |
Make this cel linked to the one located at frameIndex on the same layer
| Name | Type | Description |
|---|---|---|
frameIndex |
Int | Index of the frame with the cel to link to |
clone(): CelCreate a new identical cel
| Returns |
|---|
| Cel |
new(?chunk: ase.chunks.CelChunk, ?celType: ase.types.CelType, frame: Frame, layerIndex: Int, ?width: Int, ?height: Int): Void| Name | Type | Default |
|---|---|---|
chunk |
ase.chunks.CelChunk | (optional) |
celType |
ase.types.CelType | (optional) |
frame |
Frame | |
layerIndex |
Int | |
width |
Int | (optional) |
height |
Int | (optional) |
Private Members
frame: Frame