java.lang.Object | |
↳ | org.libpag.PAGLayer |
Known Direct Subclasses |
Known Indirect Subclasses |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | LayerTypeImage | ||||||||||
int | LayerTypeNull | ||||||||||
int | LayerTypePreCompose | ||||||||||
int | LayerTypeShape | ||||||||||
int | LayerTypeSolid | ||||||||||
int | LayerTypeText | ||||||||||
int | LayerTypeUnknown |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected long | nativeContext |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PAGLayer(long nativeContext) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
long |
currentTime()
The current time of the layer in microseconds, the layer is invisible if currentTime is not in the visible range
(startTime <= currentTime < startTime + duration) . | ||||||||||
long |
duration()
The duration of the layer in microseconds, indicates the length of the visible range.
| ||||||||||
int |
editableIndex()
Ranges from 0 to PAGFile.numTexts - 1 if the layer type is text, or from 0 to PAGFile.numImages -1 if the
layer type is image, otherwise returns -1.
| ||||||||||
boolean | equals(Object obj) | ||||||||||
boolean |
excludedFromTimeline()
Indicate whether this layer is excluded from parent's timeline.
| ||||||||||
float |
frameRate()
Returns the frame rate of this layer.
| ||||||||||
RectF |
getBounds()
Returns a rectangle in pixels that defines the original area of the layer, which is not
transformed by the matrix.
| ||||||||||
double |
getProgress()
Returns the current progress of play position, the value is from 0.0 to 1.0.
| ||||||||||
Matrix |
getTotalMatrix()
The final matrix for displaying, it is the combination of the matrix property and current matrix from animation.
| ||||||||||
long |
globalToLocalTime(long globalTime)
Converts the time from the PAGSurface (global) to the PAGLayer's (local) timeline timeline.
| ||||||||||
int | hashCode() | ||||||||||
String |
layerName()
Returns the name of the layer.
| ||||||||||
int |
layerType()
Returns the type of layer.
| ||||||||||
long |
localTimeToGlobal(long localTime)
Converts the time from the PAGLayer's (local) timeline to the PAGSurface (global) timeline.
| ||||||||||
PAGMarker[] |
markers()
Returns the markers of this layer.
| ||||||||||
Matrix |
matrix()
A matrix object containing values that alter the scaling, rotation, and translation of the layer.
| ||||||||||
PAGComposition |
parent()
Indicates the Container instance that contains this Node instance.
| ||||||||||
void |
resetMatrix()
Resets the matrix to its default value.
| ||||||||||
void |
setCurrentTime(long time)
Set the current time of the layer in microseconds.
| ||||||||||
void |
setExcludedFromTimeline(boolean value)
Set the excludedFromTimeline flag of this layer.
| ||||||||||
void |
setMatrix(Matrix matrix)
A matrix object containing values that alter the scaling, rotation, and translation of the layer.
| ||||||||||
void |
setProgress(double value)
Set the progress of play position, the value ranges from 0.0 to 1.0.
| ||||||||||
void |
setStartTime(long time)
Set the start time of the layer, in microseconds.
| ||||||||||
void | setVisible(boolean value) | ||||||||||
long |
startTime()
The start time of the layer in microseconds, indicates the start position of the visible range.
| ||||||||||
PAGLayer |
trackMatteLayer()
Returns trackMatte layer of this layer.
| ||||||||||
boolean |
visible()
Whether or not the layer is visible.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | finalize() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The current time of the layer in microseconds, the layer is invisible if currentTime is not in the visible range
(startTime <= currentTime < startTime + duration)
.
The duration of the layer in microseconds, indicates the length of the visible range.
Ranges from 0 to PAGFile.numTexts - 1 if the layer type is text, or from 0 to PAGFile.numImages -1 if the layer type is image, otherwise returns -1.
Indicate whether this layer is excluded from parent's timeline. If set to true, this layer's current time will not change when parent's current time changes.
Returns the frame rate of this layer.
Returns a rectangle in pixels that defines the original area of the layer, which is not transformed by the matrix.
Returns the current progress of play position, the value is from 0.0 to 1.0.
The final matrix for displaying, it is the combination of the matrix property and current matrix from animation.
Converts the time from the PAGSurface (global) to the PAGLayer's (local) timeline timeline. The time is in microseconds.
Returns the name of the layer.
Returns the type of layer.
Converts the time from the PAGLayer's (local) timeline to the PAGSurface (global) timeline. The time is in microseconds.
A matrix object containing values that alter the scaling, rotation, and translation of the layer. Altering it does not change the animation matrix, and it will be concatenated to current animation matrix for displaying.
Resets the matrix to its default value.
Set the current time of the layer in microseconds.
Set the excludedFromTimeline flag of this layer.
A matrix object containing values that alter the scaling, rotation, and translation of the layer. Altering it does not change the animation matrix, and it will be concatenated to current animation matrix for displaying.
Set the progress of play position, the value ranges from 0.0 to 1.0. A value of 0.0 represents the frame at startTime. A value of 1.0 represents the frame at the end of duration.
Set the start time of the layer, in microseconds.
The start time of the layer in microseconds, indicates the start position of the visible range. It could be a negative value.
Whether or not the layer is visible.