Package tripleplay.util
Interface Frames
- All Known Implementing Classes:
PackedFrames
,SimpleFrames
public interface Frames
Models the frames of a flipbook animation. The image frames may be trimmed, in which case the
image for a given frame may have an offset within the logical bounds of the entire flipbook.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(int index, ImageLayer layer) Configures the supplied image layer with the specified frame.pythagoras.f.IRectangle
bounds
(int index) Returns the bounds for the specified frame.int
count()
Returns the number of frames available.float
height()
Returns the height of a logical frame.pythagoras.f.IPoint
offset
(int index) Returns the offset (into the logical bounds) of the specified frame.float
width()
Returns the width of a logical frame.
-
Method Details
-
width
float width()Returns the width of a logical frame. -
height
float height()Returns the height of a logical frame. -
count
int count()Returns the number of frames available. -
bounds
pythagoras.f.IRectangle bounds(int index) Returns the bounds for the specified frame. -
offset
pythagoras.f.IPoint offset(int index) Returns the offset (into the logical bounds) of the specified frame. -
apply
Configures the supplied image layer with the specified frame. The layer's image will be updated and the layer's translation will be adjusted to the requested frame's offset
-