react-native-vision-camera-skiaInterfaces
SkiaOnFrameState
interface SkiaOnFrameStateRepresents the state for rendering a Frame.
Properties
canvas
canvas: SkCanvasThe GPU-canvas to draw the frameTexture
in.
Example
canvas.drawImage(frameTexture, 0, 0)frameTexture
frameTexture: SkImageThe Frame wrapped as a drawable
GPU-texture.
The frameTexture can either be drawn to
the canvas directly in which
case it will just be displayed as-is, or
drawn with a paint, in which case it will
be used as an input texture for sampling it
inside a Skia Shader.
Example
// Draw as-is:
canvas.drawImage(frameTexture, 0, 0)
// Draw with shader:
const paint = ...
const shader = ...
paint.setShader(shader)
canvas.drawImage(frameTexture, 0, 0, paint)