We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Draw triangle
Page Index Toggle Pages: 1
Draw triangle (Read 945 times)
Draw triangle
Apr 6th, 2010, 9:16am
 
I'm drawing a triangle but it always end up with an extra white line.

here is a snapshot

...

Anyone know why?
Re: Draw triangle
Reply #1 - Apr 6th, 2010, 9:18am
 
How do you draw it? In what graphic mode?
Re: Draw triangle
Reply #2 - Apr 6th, 2010, 9:19am
 
Using the triangle() function.
Re: Draw triangle
Reply #3 - Apr 6th, 2010, 10:55am
 
I've experienced that -- it's a result, I think, of the line segment's vertices landing between integers.  You can remove it by adding smooth() to setup.

By the way, I don't mean to speak for PhiLo, but I think he was likely asking what graphics mode -- P2D, JAVA2D, OPENGL, P3D, etc.  I'm assuming you're in default (P2D) mode.
Re: Draw triangle
Reply #4 - Apr 6th, 2010, 11:37am
 
isnt java2d the default render mode?
Re: Draw triangle
Reply #5 - Apr 6th, 2010, 5:03pm
 
er, yes.
Page Index Toggle Pages: 1