snap_drawing/README.md
A fast, native and cross-platform drawing and UI system leveraging the Skia library.
In most cases, you should use Valdi for building a cross-platform UI. Valdi is built on top of SnapDrawing for Android. There are some cases however where using SnapDrawing directly might make sense:
The src/demo folder contains a demo CLI desktop app that leverages SnapDrawing to setup a scene using layers with a given image or video, and generates an output as a PNG or MP4 file. The image demo renders the scene once and exports the result. The video demo creates the scene and updates it on every decoded video buffer with its timestamp. It includes a fade-out animation which shows how a SnapDrawing layer scene can be updated through a video timeline.
To process an image:
bzl run //src/snap_drawing:snap_drawing-demo -- image -i <path_to_input_image> -o <path_to_output_image>
To process a video:
bzl run //src/snap_drawing:snap_drawing-demo -- video -i <path_to_input_video> -o <path_to_output_video>