in skiko/src/commonMain/kotlin/org/jetbrains/skia/Canvas.kt [736:767]
fun drawTriangleStrip(
positions: Array<Point>,
colors: IntArray? = null,
texCoords: Array<Point>? = null,
indices: ShortArray? = null,
blendMode: BlendMode,
paint: Paint
): Canvas {
require(colors == null || colors.size == positions.size) { "Expected colors.length == positions.length, got: " + colors!!.size + " != " + positions.size }
require(texCoords == null || texCoords.size == positions.size) { "Expected texCoords.length == positions.length, got: " + texCoords!!.size + " != " + positions.size }
Stats.onNativeCall()
try {
interopScope {
_nDrawVertices(
_ptr,
1 /* kTriangleStrip_VertexMode */,
positions.size,
toInterop(Point.flattenArray(positions)),
toInterop(colors),
toInterop(Point.flattenArray(texCoords)),
indices?.size ?: 0,
toInterop(indices),
blendMode.ordinal,
getPtr(paint)
)
}
} finally {
reachabilityBarrier(this)
reachabilityBarrier(paint)
}
return this
}