Reference strokeWeight()

strokeWeight()

Sets the width of the stroke used for points, lines, and the outlines of shapes.

Note: strokeWeight() is affected by transformations, especially calls to scale().

Calling strokeWeight() without an argument returns the current stroke weight as a number.

Examples

Syntax

strokeWeight(weight)
strokeWeight()

Parameters

weight
Number: the weight of the stroke (in pixels).

Returns

Number: the current stroke weight.
Notice any errors or typos? Please let us know. Please feel free to edit src/shape/attributes.js and open a pull request!

Related References