p5.js | noStroke() Function
The noStroke() function is an inbuilt function in p5.js which is used to remove the outline which is used to draw lines and borders around shapes. By default, black color stroke is set to shapes.
Syntax:
noStroke()
Parameters: This function does not accepts any parameter.
Below program illustrates the noStroke() function in P5.js:
Program:
function setup() { // Canvas size 400*400 createCanvas(400, 400); } function draw() { // Shape defined just below, will not have any outline noStroke(); // Fill light-green color to shape fill('lightgreen'); rect(20, 20, 160, 160); } |
Output:

Reference: https://p5js.org/reference/#/p5/noStroke
Recommended Posts:
- How to get the function name from within that function using JavaScript ?
- p5.js | int() function
- D3.js | d3.max() function
- PHP | abs( ) Function
- PHP | sin( ) Function
- PHP | cos( ) Function
- PHP | end() Function
- p5.js | sin() function
- p5.js | tan() function
- D3.js | d3.rgb() Function
- p5.js | cos() function
- p5.js | log() function
- PHP | each() Function
- D3.js | d3.hcl() Function
- p5.js | arc() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



