Skip to content
Related Articles

Related Articles

p5.js | noStroke() Function

View Discussion
Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 24 Oct, 2018
View Discussion
Improve Article
Save Article

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.



Parameters: This function does not accepts any parameter.

Below program illustrates the noStroke() function in P5.js:

function setup() {
    // Canvas size 400*400
    createCanvas(400, 400); 
function draw() {
    // Shape defined just below, will not have any outline
    // Fill light-green color to shape
    rect(20, 20, 160, 160);



My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!