标签:像素 gpu draw depend size als anim making nes
矢量图、gpu直接使用、占用内存小
What Shape Layers Are
Shape layers are layers capable of defining shapes as vectors. Because they’re defined as vectors, they are resolution-independent layers. At render time, Core Animation will create a bitmap that is the appropriate size to match the device’s screen scale. The result is that shape layers will always look crisp when drawn.1
Shape layers can be stroked and filled, and their lines’ properties can be adjusted as well. In true Core Animation fashion, shape layers also have many animatable properties, which allows developers to easily create compelling animations.2 Most importantly, CAShapeLayer is, unsurprisingly, rendered entirely on the GPU, making it very fast.3 With that said, let’s see how to create shape layers.
https://www.calayer.com/core-animation/2016/05/22/cashapelayer-in-depth.html
继承与,在创建时需要赋给,并且其形状是矩形的,而 的形状是根据特定的来决定的
CAShapeLayer
使用CAShapeLayer有以下一些优点:
https://www.cnblogs.com/jingdizhiwa/p/5535619.html
CAShapeLayer-What Shape Layers Are
标签:像素 gpu draw depend size als anim making nes
原文地址:https://www.cnblogs.com/feng9exe/p/10343528.html