in skiko/src/commonMain/kotlin/org/jetbrains/skia/Shader.kt [279:316]
fun makeTwoPointConicalGradient(
x0: Float,
y0: Float,
r0: Float,
x1: Float,
y1: Float,
r1: Float,
colors: Array<Color4f>,
cs: ColorSpace?,
positions: FloatArray?,
style: GradientStyle
): Shader {
return try {
require(positions == null || colors.size == positions.size) { "colors.length " + colors.size + "!= positions.length " + positions!!.size }
Stats.onNativeCall()
Shader(
interopScope {
_nMakeTwoPointConicalGradientCS(
x0,
y0,
r0,
x1,
y1,
r1,
toInterop(Color4f.flattenArray(colors)),
getPtr(cs),
toInterop(positions),
colors.size,
style.tileMode.ordinal,
style._getFlags(),
toInterop(style._getMatrixArray())
)
}
)
} finally {
reachabilityBarrier(cs)
}
}