Skip to content

finite_draw_create_snapshot

The finite_draw_create_snapshot function attempts to create a restore point of a cairo surface.

void finite_draw_create_snapshot(FiniteShell *shell)
TypeDescription
FiniteShell *shellThe FiniteShell where the window is.
#include <finite/draw.h>
finite_shm_alloc(shell, true);
finite_draw_create_snapshot(myShell);

This function must have a valid FiniteShell

This function uses Cairo which requires a valid cairo_surface_t in FiniteShell.cairo_surface beforehand.

This function copys all current data on screen and stores it in FiniteShell.snapshot in FiniteShell

At some point finite_draw_finish should be called to apply the changes made by the snapshot visually.