shape with only certain sides stroked?
in
Programming Questions
•
10 months ago
Is it possible to create a shape wherein only certain sides are stroked?
For example, I only want the tops and bottom to be stroked:
I am guessing I need to first draw the shape with noStroke and then go back and stroke in the sides I want drawn:beginShape( );vertex( 10, 10 );vertex( 90, 10 );vertex( 90, 90 );vertex( 10, 90 );vertex( 10, 10 );endShape( );
But maybe there is some cool way to do it with the shape & vertex calls?noStroke( );beginShape( );vertex( 10, 10 );vertex( 90, 10 );vertex( 90, 90 );vertex( 10, 90 );vertex( 10, 10 );endShape( );stroke( 0 );line( 10, 10, 90, 10 );line( 10, 90, 90, 90 );
1