🧪 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 set_ellipse_mode

Specify how Sketchingpy should interpret the position and size arguments. This is part of the reference section.

Purpose

Determine how arcs should be placed within the sketch and how they should be sized for ellipses. Available options:
  • center: Provide x and y coordinates followed by width and height.
  • radius: Provide x and y coordinates followed by half width and half height.
  • corner: Left and top coordinates followed by width and height.
  • corners: Left and top coordinates followed by right and bottom coordinates.
This modifies the interpretation of x1, y1, x2, and y2 but only for drawing ellipses.

Snippet

Indiciate that the ellipse parameters will be center X, center Y, width, and height.
sketch.set_ellipse_mode('center')

Parameters

  • mode: String describing the mode to use.

Examples

Availability

Available for all platforms.

See also