Hi all,
Short version:
Is there a way to draw a transparent line so that it doesn't overlap/build up when drawn over itself? (That is, so that I can draw an alpha=50 line and draw over it again and it's still alpha=50 (instead of getting darker at the intersections)?
Longer version:
I'm drawing a semi-transparent line (e.g. yellow, alpha = 50) based on touch events, and that works well, except that I'm drawing a line from touch point to touch point, with a circle at each junction to keep the line "solid" with no ugly elbows.
This works fine for opaque lines, but for transparent lines, I get an ugly overlap because the alpha is cumulative.
Ideally, I'd like to draw the line so that its alpha is always 50, no matter how many times I draw over it.
Is there some kind of blend mode (or other graphics voodoo) that would help?
Or perhaps I have to draw the line opaque, but wrapped somehow inside a transparent drawable?
OK, now my brain hurts...
Short version:
Is there a way to draw a transparent line so that it doesn't overlap/build up when drawn over itself? (That is, so that I can draw an alpha=50 line and draw over it again and it's still alpha=50 (instead of getting darker at the intersections)?
Longer version:
I'm drawing a semi-transparent line (e.g. yellow, alpha = 50) based on touch events, and that works well, except that I'm drawing a line from touch point to touch point, with a circle at each junction to keep the line "solid" with no ugly elbows.
This works fine for opaque lines, but for transparent lines, I get an ugly overlap because the alpha is cumulative.
Ideally, I'd like to draw the line so that its alpha is always 50, no matter how many times I draw over it.
Is there some kind of blend mode (or other graphics voodoo) that would help?
Or perhaps I have to draw the line opaque, but wrapped somehow inside a transparent drawable?
OK, now my brain hurts...