我无法理解 R = 0
、R = S
、R = S*Da
的含义,定义在 kCGBlendMode
值,例如 kCGBlendModeClear
、kCGBlendModeCopy
、kCGBlendModeSourceIn
。那么,这些符号指的是什么?
最佳答案
R=0
表示结果颜色将为 0,表示将被清除。
R=S
表示结果颜色与源颜色相同
R=S*Da
表示结果是源颜色乘以目标的 alpha 值
如果你看一下 documentation向下滚动你会看到它们的含义:
The blend mode constants introduced in OS X v10.5 represent the Porter-Duff blend modes (a little explanation how they work). The symbols in the equations for these blend modes are:
- R is the premultiplied result
- S is the source color, and includes alpha
- D is the destination color, and includes alpha
- Ra, Sa, and Da are the alpha components of R, S, and D
如果您进一步查看 Setting blend modes您可以看到应用的大部分混合模式以及它们的结果可能是什么样子。
关于ios - kCGBlendMode 值中 R、S、Da 的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29866929/