Interface: IAlignmentStrategy
Defined in: src/display/alignment/IAlignmentStrategy.ts:51
Interface for layer alignment strategies
Methods
align()
align(
targetSlice,
referenceSlice,
options?): AlignmentResult;Defined in: src/display/alignment/IAlignmentStrategy.ts:59
Calculate alignment transformation for a target slice relative to a reference slice
Parameters
targetSlice
The slice to align
referenceSlice
The reference slice to align to
options?
Alignment options
Returns
Alignment transformation result
applyAlignment()
applyAlignment(sprite, alignment): void;Defined in: src/display/alignment/IAlignmentStrategy.ts:70
Apply alignment transformation to a sprite
Parameters
sprite
Sprite
The sprite to transform
alignment
The alignment result
Returns
void
getName()
getName(): string;Defined in: src/display/alignment/IAlignmentStrategy.ts:75
Get the name of this alignment strategy
Returns
string
canHandle()
canHandle(targetSlice, referenceSlice): boolean;Defined in: src/display/alignment/IAlignmentStrategy.ts:83
Check if this strategy can handle the given slices
Parameters
targetSlice
The slice to align
referenceSlice
The reference slice
Returns
boolean
true if this strategy can handle the alignment