CIFilter的中心向量 [英] Center vector of CIFilter
问题描述
我很难理解许多不同的CIFilter使用的中心向量的含义。
I'm having a hard time understanding the meaning of the center vector used by many different CIFilters.
让我们来看一下 CIRadialGradient
,例如, inputCenter
是什么意思?它的值范围是多少?
Let's take CIRadialGradient
for example, what does the inputCenter
mean? What's its values range? How does its coordinate system behave etc.
推荐答案
正如Brian所说,它只是一种编码效果居中位置的类型。但是,CoreImage坐标从您在iOS上惯用的Y轴上反转了:0,0点是左下角,并且y值随着您向屏幕顶部移动而增大。
As Brian said, it's just a type that encodes a position where the effect is centered. HOWEVER, CoreImage coordinates are inverted on the Y-axis from what you're used to using on iOS: The 0,0 point is the lower-left corner and the y value increases as you move toward the top of the screen.
这篇关于CIFilter的中心向量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!