动态创建的PAGTextLayer 如何设置坐标? #2225
-
在PAGPlayer函数中可以给PAGPlayer设置PAGComposition PAGComposition又可以通过static std::shared_ptr Make(int width, int height);函数创建, 伪代码 auto comPtr = std::shared_ptr Make(100, 100);
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
1、PAGComposition 就是一个容器,支持自己创建,具体可以看下 API 文档: |
Beta Was this translation helpful? Give feedback.
-
可以参考下 iOS 平台的这个 demo, https://github.com/libpag/pag-ios/blob/master/sample/pag-ios/ViewController/MoveAndRotateLayerViewController.swift |
Beta Was this translation helpful? Give feedback.
1、PAGComposition 就是一个容器,支持自己创建,具体可以看下 API 文档:
2、对于图形绘制而言,设置位置都是通过 setMatrix,相关用法可以网上搜索下或看下源码中 pag 的测试用例