🧪 Version 0.3.1 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 set_image_mode

Specify how Sketchingpy should place images. This is part of the reference section.

Purpose

Determine how images' coordinates should be interpreted when drawing. Available options:
  • center: Provide x and y coordinates of the center of the image.
  • corner: Left and top coordinates of the image.
This modifies the interpretation of x, y but only for drawing images.

Snippet

Indiciate that the image parameters will be center X and center Y.
sketch.set_image_mode('center')

Parameters

  • mode: String describing the mode to use.

Examples

Availability

Available for all platforms.

See also