|
Author |
Topic: cant draw text over lines (Read 412 times) |
|
levinbeicht
|
cant draw text over lines
« on: Feb 15th, 2005, 4:43pm » |
|
Hi, I got a little problem. In my app i draw some lines and then want some text to be drawn on top of them... But when I try to do this, the lines (which are drawn before the text) in the image are over the text, so you cant read it. If i draw a rect instead it works just fine, but using lines and text in the same part of the image just doesn't work. Help me! Is this a common problem or is it just my weird java-installation? try this code to see the effect: Code: background(100); stroke(0); fill(0); // the lines which block the text for (int i = 0; i < 100; i++) { line (i, 0, i , 40); } // a rect that is drawn just the same but does not // block anthing rect (0, 41, width, height); // the text, drawn last but not on "top" fill (255); BFont metaBold; metaBold = loadFont("Meta-Bold.vlw.gz"); textFont(metaBold, 44); text("word", 15, 50); |
|
|
|
|
|
Euskadi
|
Re: cant draw text over lines
« Reply #1 on: Feb 20th, 2005, 9:30pm » |
|
I have seen this too. In fact, I have had lines under a filled rect with text over the rect, that bleed through and mess up the text. I can't remember if I have posted this but I am pretty sure that: 1) it's not your fault 2) Casey & Ben know about it
|
|
|
|
levinbeicht
|
Re: cant draw text over lines
« Reply #2 on: Feb 24th, 2005, 9:05am » |
|
just wanted to mention it if you have the same problem, just use rect() instead with just two points, and the problem is gone... not very nice, and not very fast, but hey, it's working
|
« Last Edit: Feb 24th, 2005, 9:05am by levinbeicht » |
|
|
|
|
|