← All docs

cairo_save()

Saves the context state so a later cairo_restore() can return to it.

cairo_save()

function cairo_save(mixed $context): void

Saves the context state so a later cairo_restore() can return to it.

Parameters:

  • $context (mixed)

Returns: void

Availability

  • Compiled (AOT): supported through the compiler-injected image prelude.
  • eval() (magician interpreter): not available inside eval’d code.

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how cairo_save is implemented in the compiler, see the internals page.