🖼️ Image preloads for web are now available. Get your images faster! See draw_image for more details.

Sketchingpy

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

Reference for set_stroke_weight

Set the stroke size. This is part of the reference section.

Purpose

Set the width of stroke for drawing outlines for shapes and figures as well as lines.

Snippet

Set stroke to 3 pixels.
sketch.set_stroke_weight(3)

Parameters

  • size: Number of pixels for the stroke weight.

Examples

Availability

Available on all platforms.

See also