🧪 Version 0.2.2 is our alpha release candidate. Please send us bug reports and suggestions!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for draw_buffer

Create an off-screen buffer. This is part of the reference section.

Purpose

Create an "offscreen buffer" which can be used to save the results of drawing operations to memory, making them much faster to draw again later or in repetition. Note that buffers with opaque backgrounds may be more efficient in some renderers than buffers with transparent backgrounds.

Snippet

Draw a buffer called "example-buffer" at x position of 100 and y position of 50.
sketch.draw_buffer(100, 50, 'example-buffer')

Parameters

  • x: The horizontal coordinate at which to draw the buffer contents.
  • y: The vertical coordinate at which to draw the buffer contents.
  • name: The name of the buffer to draw.

Examples

Availability

Available for all platforms.

See also