strokeWeight()

Shape / Attributes

Description

Sets the width of the stroke used for lines, points, and shape borders.

Syntax

void strokeWeight(float w)

Parameters

NameTypeDescription
wfloatstroke weight in pixels

Returns

void

Related

Under the Hood

From Processing.h:

void strokeWeight(float w); void strokeWeight(float); { _api::strokeWeight((float)w); template<typename A, typename=std::enable_if_t<std::is_arithmetic_v<A>>> void strokeWeight(A w) { strokeWeight((float)w); inline void strokeWeight(float w){ if(PApplet::g_papplet) PApplet::g_papplet->strokeWeight(w); } inline void PGraphics::strokeWeight(float w) { if(PApplet::g_papplet) PApplet::g_papplet->strokeWeight(w); }

Under the Hood

From Processing.cpp:

void PApplet::strokeWeight(float w) {strokeW=w;}