PAGFile Class Reference
Inherits from | PAGComposition : PAGLayer : NSObject |
---|---|
Declared in | PAGFile.h |
+ MaxSupportedTagLevel
The maximum tag level current SDK supports.
+ (uint16_t)MaxSupportedTagLevel
Declared In
PAGFile.h
+ Load:
Load a pag file from the specified path, return null if the file does not exist or the data is not a pag file. Note: All PAGFiles loaded by the same path share the same internal cache. The internal cache is alive until all PAGFiles are released. Use ‘[PAGFile Load:size:]’ instead if you don’t want to load a PAGFile from the intenal caches.
+ (PAGFile *)Load:(NSString *)path
Declared In
PAGFile.h
+ Load:size:
Load a pag file from byte data, return null if the bytes is empty or it’s not a valid pag file.
+ (PAGFile *)Load:(const void *)bytes size:(size_t)length
Declared In
PAGFile.h
– path
The path string of this file, returns empty string if the file is loaded from byte stream.
- (NSString *)path
Declared In
PAGFile.h
– getTextData:
Get a text data of the specified index. The index ranges from 0 to numTexts - 1. Note: It always returns the default text data.
- (PAGText *)getTextData:(int)editableTextIndex
Declared In
PAGFile.h
– replaceText:data:
Replace the text data of the specified index. The index ranges from 0 to PAGFile.numTexts - 1. Passing in null for the textData parameter will reset it to default text data.
- (void)replaceText:(int)editableTextIndex data:(PAGText *)value
Declared In
PAGFile.h
– replaceImage:data:
Replace the image data of the specified index. The index ranges from 0 to PAGFile.numImages - 1. Passing in null for the image parameter will reset it to default image data.
- (void)replaceImage:(int)editableImageIndex data:(PAGImage *)value
Declared In
PAGFile.h
– replaceImageByName:data:
Replace the image data of the specified layer name. Passing in null for the image parameter will reset it to default image data.
- (void)replaceImageByName:(NSString *)layerName data:(PAGImage *)value
Declared In
PAGFile.h
– getLayersByEditableIndex:layerType:
Return an array of layers by specified editable index and layer type.
- (NSArray<PAGLayer*> *)getLayersByEditableIndex:(int)index layerType:(PAGLayerType)type
Declared In
PAGFile.h
– timeStretchMode
Indicate how to stretch the original duration to fit target duration when file’s duration is changed. The default value is PAGTimeStretchMode::Repeat.
- (PAGTimeStretchMode)timeStretchMode
Declared In
PAGFile.h
– seTimeStretchMode:
Set the timeStretchMode of this file.
- (void)seTimeStretchMode:(PAGTimeStretchMode)value
Declared In
PAGFile.h
– setDuration:
Set the duration of this PAGFile. Passing a value less than or equal to 0 resets the duration to its default value.
- (void)setDuration:(int64_t)duration
Declared In
PAGFile.h
– copyOriginal
Make a copy of the original file, any modification to current file has no effect on the result file.
- (PAGFile *)copyOriginal
Declared In
PAGFile.h