|
Author |
Topic: stroke and fill not matching (Read 432 times) |
|
Koenie
|
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
|
|
|
REAS
|
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
|
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
|
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
|
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
|
|
|
|