public class

PAGComposition

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

Summary

[Expand]
Inherited Constants
From class org.libpag.PAGLayer
[Expand]
Inherited Fields
From class org.libpag.PAGLayer
Public Constructors
PAGComposition(long nativeContext)
Public Methods
static PAGComposition Make(int width, int height)
Make a empty PAGComposition with specified size.
void addLayer(PAGLayer pagLayer)
Add PAGLayer to current PAGComposition at the top.
void addLayerAt(PAGLayer pagLayer, int index)
Add PAGLayer to current PAGComposition at the specified index.
ByteBuffer audioBytes()
The audio data of this composition, which is an AAC audio in an MPEG-4 container.
PAGMarker[] audioMarkers()
Returns the audio markers of this composition.
long audioStartTime()
Indicates when the first frame of the audio plays in the composition's timeline.
boolean contains(PAGLayer pagLayer)
Check whether current PAGComposition contains the specified pagLayer.
PAGLayer getLayerAt(int index)
Returns the child layer that exists at the specified index.
int getLayerIndex(PAGLayer layer)
Returns the index position of a child layer.
PAGLayer[] getLayersByName(String layerName)
Returns an array of layers that match the specified layer name.
PAGLayer[] getLayersUnderPoint(float localX, float localY)
Returns an array of layers that lie under the specified point.
int height()
Returns the height of Composition.
int numChildren()
Returns the number of child layers of this composition.
void removeAllLayers()
Remove all PAGLayers from current PAGComposition.
PAGLayer removeLayer(PAGLayer pagLayer)
Remove the specified PAGLayer from current PAGComposition.
PAGLayer removeLayerAt(int index)
Remove the PAGLayer at specified index from current PAGComposition.
void setContentSize(int width, int height)
Set the size of the Composition.
void setLayerIndex(PAGLayer layer, int index)
Changes the position of an existing child in the container.
void swapLayer(PAGLayer pagLayer1, PAGLayer pagLayer2)
Swap the layers.
void swapLayerAt(int index1, int index2)
Swap the layers at the specified index.
int width()
The width of Composition.
[Expand]
Inherited Methods
From class org.libpag.PAGLayer
From class java.lang.Object

Public Constructors

public PAGComposition (long nativeContext)

Public Methods

public static PAGComposition Make (int width, int height)

Make a empty PAGComposition with specified size.

public void addLayer (PAGLayer pagLayer)

Add PAGLayer to current PAGComposition at the top.

public void addLayerAt (PAGLayer pagLayer, int index)

Add PAGLayer to current PAGComposition at the specified index.

public ByteBuffer audioBytes ()

The audio data of this composition, which is an AAC audio in an MPEG-4 container.

public PAGMarker[] audioMarkers ()

Returns the audio markers of this composition.

public long audioStartTime ()

Indicates when the first frame of the audio plays in the composition's timeline.

public boolean contains (PAGLayer pagLayer)

Check whether current PAGComposition contains the specified pagLayer.

public PAGLayer getLayerAt (int index)

Returns the child layer that exists at the specified index.

Parameters
index The index position of the child layer.
Returns
  • The child layer at the specified index position.

public int getLayerIndex (PAGLayer layer)

Returns the index position of a child layer.

Parameters
layer The layer instance to identify.
Returns
  • The index position of the child layer to identify.

public PAGLayer[] getLayersByName (String layerName)

Returns an array of layers that match the specified layer name.

public PAGLayer[] getLayersUnderPoint (float localX, float localY)

Returns an array of layers that lie under the specified point. The point is in pixels and from this PAGComposition's local coordinates.

public int height ()

Returns the height of Composition.

public int numChildren ()

Returns the number of child layers of this composition.

public void removeAllLayers ()

Remove all PAGLayers from current PAGComposition.

public PAGLayer removeLayer (PAGLayer pagLayer)

Remove the specified PAGLayer from current PAGComposition.

public PAGLayer removeLayerAt (int index)

Remove the PAGLayer at specified index from current PAGComposition.

public void setContentSize (int width, int height)

Set the size of the Composition.

public void setLayerIndex (PAGLayer layer, int index)

Changes the position of an existing child in the container. This affects the layering of child layers.

Parameters
layer The child layer for which you want to change the index number.
index The resulting index number for the child layer.

public void swapLayer (PAGLayer pagLayer1, PAGLayer pagLayer2)

Swap the layers.

public void swapLayerAt (int index1, int index2)

Swap the layers at the specified index.

public int width ()

The width of Composition.