Reference for set_rect_mode
Specify how Sketchingpy should interpret the position and size arguments. This is part of the reference section.
Arc
Buffer
Data
Dialog
Ellipse
Geo Utils
Image
Joystick (future)
Keyboard
Line
Mouse / Touchscreen
Pixel
Rectangle
set_rect_mode
Renderers
Shape
Sound (future)
Style
System
Text
Transform
Purpose
Determine how arcs should be placed within the sketch and how they should be sized for rectangles. 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.
Snippet
Indiciate that the rect parameters will be center X, center Y, width, and height.
sketch.set_rect_mode('center')
Parameters
- mode: String describing the mode to use.
Examples
Availability
Available for all platforms.