in skiko/src/commonMain/kotlin/org/jetbrains/skia/Shader.kt [172:203]
fun makeRadialGradient(
x: Float,
y: Float,
r: 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 {
_nMakeRadialGradientCS(
x,
y,
r,
toInterop(Color4f.flattenArray(colors)),
getPtr(cs),
toInterop(positions),
colors.size,
style.tileMode.ordinal,
style._getFlags(),
toInterop(style._getMatrixArray())
)
}
)
} finally {
reachabilityBarrier(cs)
}
}