public class

PAGLayer

extends Object
java.lang.Object
   ↳ org.libpag.PAGLayer
Known Direct Subclasses
Known Indirect Subclasses

Summary

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

Constants

public static final int LayerTypeImage

Constant Value: 5 (0x00000005)

public static final int LayerTypeNull

Constant Value: 1 (0x00000001)

public static final int LayerTypePreCompose

Constant Value: 6 (0x00000006)

public static final int LayerTypeShape

Constant Value: 4 (0x00000004)

public static final int LayerTypeSolid

Constant Value: 2 (0x00000002)

public static final int LayerTypeText

Constant Value: 3 (0x00000003)

public static final int LayerTypeUnknown

Constant Value: 0 (0x00000000)

Fields

protected long nativeContext

Public Constructors

public PAGLayer (long nativeContext)

Public Methods

public 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).

public long duration ()

The duration of the layer in microseconds, indicates the length of the visible range.

public 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.

public boolean equals (Object obj)

public boolean excludedFromTimeline ()

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.

public float frameRate ()

Returns the frame rate of this layer.

public RectF getBounds ()

Returns a rectangle in pixels that defines the original area of the layer, which is not transformed by the matrix.

public double getProgress ()

Returns the current progress of play position, the value is from 0.0 to 1.0.

public Matrix getTotalMatrix ()

The final matrix for displaying, it is the combination of the matrix property and current matrix from animation.

public long globalToLocalTime (long globalTime)

Converts the time from the PAGSurface (global) to the PAGLayer's (local) timeline timeline. The time is in microseconds.

public int hashCode ()

public String layerName ()

Returns the name of the layer.

public int layerType ()

Returns the type of layer.

public long localTimeToGlobal (long localTime)

Converts the time from the PAGLayer's (local) timeline to the PAGSurface (global) timeline. The time is in microseconds.

public PAGMarker[] markers ()

Returns the markers of this layer.

public Matrix matrix ()

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.

public PAGComposition parent ()

Indicates the Container instance that contains this Node instance.

public void resetMatrix ()

Resets the matrix to its default value.

public void setCurrentTime (long time)

Set the current time of the layer in microseconds.

public void setExcludedFromTimeline (boolean value)

Set the excludedFromTimeline flag of this layer.

public void setMatrix (Matrix matrix)

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.

public void setProgress (double value)

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.

public void setStartTime (long time)

Set the start time of the layer, in microseconds.

public void setVisible (boolean value)

public long startTime ()

The start time of the layer in microseconds, indicates the start position of the visible range. It could be a negative value.

public PAGLayer trackMatteLayer ()

Returns trackMatte layer of this layer.

public boolean visible ()

Whether or not the layer is visible.

Protected Methods

protected void finalize ()