Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

strokeMode()

   
Examples  
// Set line width to be thick because 
// strokeMode() is not noticeable on thin lines 
strokeWidth(4); 
 
// Choose an endcap and a join and connect them with | (or) 
// This creates square edges 
strokeMode(SQUARE_ENDCAP | MITERED_JOIN); 
beginShape(LINE_STRIP); 
vertex(20, 50); 
vertex(50, 10); 
vertex(80, 50); 
endShape(); 
 
// Create rounded edges 
strokeMode(ROUND_ENDCAP | ROUND_JOIN); 
beginShape(LINE_STRIP); 
vertex(20, 80); 
vertex(50, 40); 
vertex(80, 80); 
endShape(); 
 

Description   Sets attributes for the stroke. The endcap determines the shape of the "caps" on either end of the line, and the "join" determines how continuous lines are connected together. endcap is one of SQUARE_ENDCAP, ROUND_ENDCAP, PROJECTED_ENDCAP. the join is one of MITERED_JOIN, ROUND_JOIN, BEVELED_JOIN. These correspond to the type of lines found in Postscript and Adobe Illustrator.
   
Syntax  
strokeMode(mode)
   
Parameters  
mode   an endcap and a join propery or'ed together

   
Returns   None
   
Usage   Web & Application
   
Related   stroke()
strokeWidth()
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas