Cel
ase.Cel (Class)
Instance Members
chunk: ase.chunks.CelChunk
pixelData: haxe.io.Bytes
Uncompressed 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: Int
Required length of the data in bytes. Always equals to width x height x (bpp / 8)
width: Int
Cel width
height: Int
Cel height
layerIndex: Int
Layer index
xPosition: Int
Cel x position
yPosition: Int
Cel 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): Void
Set 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(): Cel
Create 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