Attributes¶
fill()¶
stroke()¶
-
p5.
stroke
(*color_args, **color_kwargs)¶ Set the color used to draw lines around shapes
Parameters: - color_args (tuple) – positional arguments to be parsed as a color.
- color_kwargs (dict) – keyword arguments to be parsed as a color.
Note: Both color_args and color_kwargs are directly sent to Color.parse_color
Returns: The stroke color.
Return type:
tint()¶
-
p5.
tint
(*color_args, **color_kwargs)¶ Set the tint color for the sketch.
Parameters: - color_args (tuple) – positional arguments to be parsed as a color.
- color_kwargs (dict) – keyword arguments to be parsed as a color.
Note: Both color_args and color_kwargs are directly sent to Color.parse_color
Returns: The tint color.
Return type:
stroke_weight()¶
-
p5.
stroke_weight
(thickness)¶ Sets the width of the stroke used for lines, points, and the border around shapes. All widths are set in units of pixels.
Parameters: weight (int) – thickness of stroke in pixels
stroke_cap()¶
-
p5.
stroke_cap
(c)¶ Sets the style of line endings. The ends are SQUARE, PROJECT, and ROUND. The default cap is ROUND.
Parameters: c (string) – either ‘SQUARE’, ‘PROJECT’ or ‘ROUND’
stroke_join()¶
-
p5.
stroke_join
(j)¶ Sets the style of the joints which connect line segments. These joints are either mitered, beveled, or rounded and specified with the corresponding parameters MITER, BEVEL, and ROUND. The default joint is MITER.
Parameters: weight – either ‘MITER’, ‘BEVEL’ or ‘ROUND’