Packagecom.pblabs.rendering2D.spritesheet
Interfacepublic interface ISpriteSheetDivider
Implementors CellCountDivider, FixedSizeDivider

Base interface for descriptions about how frames are laid out in a sprite sheet.



Public Properties
 PropertyDefined By
  frameCount : int
[read-only] How many frames are in this sprite sheet?
ISpriteSheetDivider
  owningSheet : SpriteSheetComponent
[write-only] Many times you want to infer information about frames based on data from the sprite sheet.
ISpriteSheetDivider
Public Methods
 MethodDefined By
  
The MultiSpriteSheetHelper has to be able to clone dividers.
ISpriteSheetDivider
  
getFrameArea(index:int):Rectangle
Return the size of a frame, given the desired index and the source image's dimensions.
ISpriteSheetDivider
Property Detail
frameCountproperty
frameCount:int  [read-only]

How many frames are in this sprite sheet?


Implementation
    public function get frameCount():int
owningSheetproperty 
owningSheet:SpriteSheetComponent  [write-only]

Many times you want to infer information about frames based on data from the sprite sheet. When the divider is assigned to a sprite sheet, the sprite sheet passes itself to OwningSheet so you can store it and get information from it.


Implementation
    public function set owningSheet(value:SpriteSheetComponent):void
Method Detail
clone()method
public function clone():ISpriteSheetDivider

The MultiSpriteSheetHelper has to be able to clone dividers. So we have a Clone method.

Returns
ISpriteSheetDivider
getFrameArea()method 
public function getFrameArea(index:int):Rectangle

Return the size of a frame, given the desired index and the source image's dimensions.

Parameters

index:int

Returns
Rectangle