PAGLayer Class Reference

Inherits from NSObject
Declared in PAGLayer.h

– layerType

Returns the type of layer.

- (PAGLayerType)layerType

Declared In

PAGLayer.h

– layerName

Returns the name of the layer.

- (NSString *)layerName

Declared In

PAGLayer.h

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

- (CGAffineTransform)matrix

Declared In

PAGLayer.h

– setMatrix:

- (void)setMatrix:(CGAffineTransform)matrix

– resetMatrix

Resets the matrix to its default value.

- (void)resetMatrix

Declared In

PAGLayer.h

– getTotalMatrix

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

- (CGAffineTransform)getTotalMatrix

Declared In

PAGLayer.h

– visible

Whether or not the layer is visible.

- (BOOL)visible

Declared In

PAGLayer.h

– setVisible:

- (void)setVisible:(BOOL)visible

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

- (NSInteger)editableIndex

Declared In

PAGLayer.h

– parent

Indicates the PAGComposition instance that contains this PAGLayer instance.

- (PAGComposition *)parent

Declared In

PAGLayer.h

– markers

Returns the markers of current PAGLayer.

- (NSArray<PAGMarker*> *)markers

Declared In

PAGLayer.h

– localTimeToGlobal:

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

- (int64_t)localTimeToGlobal:(int64_t)localTime

Declared In

PAGLayer.h

– globalToLocalTime:

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

- (int64_t)globalToLocalTime:(int64_t)globalTime

Declared In

PAGLayer.h

– duration

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

- (int64_t)duration

Declared In

PAGLayer.h

– frameRate

Returns the frame rate of this layer.

- (float)frameRate

Declared In

PAGLayer.h

– startTime

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

- (int64_t)startTime

Declared In

PAGLayer.h

– setStartTime:

Set the start time of the layer, in microseconds.

- (void)setStartTime:(int64_t)time

Declared In

PAGLayer.h

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

- (int64_t)currentTime

Declared In

PAGLayer.h

– setCurrentTime:

Set the current time of the layer in microseconds.

- (void)setCurrentTime:(int64_t)time

Declared In

PAGLayer.h

– getProgress

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

- (double)getProgress

Declared In

PAGLayer.h

– setProgress:

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.

- (void)setProgress:(double)value

Declared In

PAGLayer.h

– trackMatteLayer

Returns trackMatte layer of this layer.

- (PAGLayer *)trackMatteLayer

Declared In

PAGLayer.h

– getBounds

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

- (CGRect)getBounds

Declared In

PAGLayer.h

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

- (BOOL)excludedFromTimeline

Declared In

PAGLayer.h

– setExcludedFromTimeline:

Set the excludedFromTimeline flag of this layer.

- (void)setExcludedFromTimeline:(BOOL)value

Declared In

PAGLayer.h