Constructor

new(?chunk:CelChunk, ?celType:CelType, frame:Frame, layerIndex:Int, ?width:Int, ?height:Int)

Variables

read onlyheight:Int

Cel height

layerIndex:Int

Layer index

read onlypixelData: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

read onlypixelDataLength:Int

Required length of the data in bytes. Always equals to width x height x (bpp / 8)

read onlywidth:Int

Cel width

xPosition:Int

Cel x position

yPosition:Int

Cel y position

Methods

clone():Cel

Create a new identical cel

getPixel(px:Int, py:Int):Null<Int>

Get pixel color or color index at given position

init(width:Int, height:Int):Void

Initalize Cel pixel data

Parameters:

width
null

height

link(frameIndex:Int):Void

Make this cel linked to the one located at frameIndex on the same layer

Parameters:

frameIndex

Index of the frame with the cel to link to

setPixel(px:Int, py:Int, color:Int):Void

Set pixel color or color index at given position

Parameters:

px

x

py

y

color

ARGB color for 32bpp mode, GGGG color for 16bpp mode and index or GG color for Indexed or 8bpp mode

setPixelData(newData:Bytes, ?newWidth:Int, ?newHeight:Int):Void

Set new pixel data