FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Software Bugs
(Moderator: fry)
   stroke and fill not matching
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: stroke and fill not matching  (Read 432 times)
Koenie

170825270170825270koeniedesign WWW Email
stroke and fill not matching
« on: Nov 10th, 2003, 5:41pm »

I got a weird bug, the stroke and the fill of a POLYGON shape are not matching, check out the example.
The white fill and the black stroke are both the same shape. Is this a bug?
 
example: http://koeniedesign.com/bug/
 
Koenie
 

http://koeniedesign.com
flight404

WWW Email
Re: stroke and fill not matching
« Reply #1 on: Nov 10th, 2003, 10:17pm »

I seem to recall a rumor about Processing having a bug involving the filling of concave shapes.  Let me look for the post...
 
 
r
 
 
I found some mentions of this.  Seems like it is a known issue that is nearing being fixed.
 
http://proce55ing.net/discourse/yabb/board_Proce55ing_software__bugs_action_display_num_1062469819.html
 
« Last Edit: Nov 10th, 2003, 10:20pm by flight404 »  
fry


WWW
Re: stroke and fill not matching
« Reply #2 on: Nov 10th, 2003, 11:09pm »

yep, from the known bugs list in bugs.txt:
 
- concave polygons still don't work, meaning that lots of irregular
  polygons won't draw properly.
  http://proce55ing.net/discourse/yabb/board_Proce55ing_software__bugs_action_display_num_1062469819.html
 
and the fix is hopefully near.. it's part of the new graphics code that keeps getting delayed.
 
the workaround for your example is to break the shape into separate pieces.
 
REAS

WWW
Re: stroke and fill not matching
« Reply #3 on: Nov 11th, 2003, 4:12am »

good work koenie.  
that's the best visualization i've seen of this bug.
(it's not really a bug as much as code which hasn't been implemented yet).
 
Jerronimo

WWW
Re: stroke and fill not matching
« Reply #4 on: Nov 11th, 2003, 2:41pm »

ya know, I don't know if it will help here, but I was working on a paint program a little while ago, and a friend wrote a fast, accurate flood fill algorithm for me that works amazingly well.   I can post it here if it will help...
 
although i can't imagine it helping this problem, really...
 
I'll throw it into a sketch anyway...
 
toxi

WWW
Re: stroke and fill not matching
« Reply #5 on: Nov 11th, 2003, 5:47pm »

if you are fine with losing the outline, you can use a TRIANGLE_STRIP for now to avoid the problem:
 
Code:
void update() {
    beginShape(TRIANGLE_STRIP);
    for (float i = 0; i <= PI; i +=0.04) {
 vertex(30*cos(a+i)+x, 30*sin(a+i)+y);
 vertex(70*cos(a+i)+x, 70*sin(a+i)+y);
    }
    endShape();
 
    a = (a > TWO_PI) ? 0 : a+s;
  }

 

http://toxi.co.uk/
Koenie

170825270170825270koeniedesign WWW Email
Re: stroke and fill not matching
« Reply #6 on: Nov 11th, 2003, 9:59pm »

toxi, i got that exact same fix for my particular case already. thanks anyway. btw, using triangle_strip looks ugly with smooth(); (in this case)
 
Koenie
 

http://koeniedesign.com
Pages: 1 

« Previous topic | Next topic »