Packagecom.pblabs.rendering2D.spritesheet
Classpublic class FixedSizeDivider
InheritanceFixedSizeDivider Inheritance Object
Implements ISpriteSheetDivider

Divide a sprite sheet into fixed-size cells.



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

How many frames are in this sprite sheet?


Implementation
    public function get frameCount():int
heightproperty 
public var height:int = 32

The height of each frame.

horizontalSpacingproperty 
public var horizontalSpacing:int = 0

The horizonal spacing between frames

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
verticalSpacingproperty 
public var verticalSpacing:int = 0

The vertical spacing between frames

widthproperty 
public var width:int = 32

The width of each frame.

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