[JAVA2D] Connecting two semi-transparent shapes by a line
Okay here is the scenario (and I'm hoping there is something in the
API that permits this because at this point I haven't found anything).
What I have are two RoundRectangle2Ds that have an alpha of 50
percent. I want to draw a line connecting the centers of both of these
If the RR2Ds were opaque I wouldn't have a problem, I would just draw
all of the links first and then draw all of the RR2Ds. Piece of cake.
However since the RR2Ds allow you to see through them, this clearly
I've looked at using Graphics2D.setClip(), but this will only allow me
to clip the line against one of the shapes. I also looked into solving
the problem using CAG, but Area doesn't work with lines (though I will
try to adapt my pathing algorithms to use rectangles if that solves my
drawing problem (here's hoping).
It would be nice if there was a way to do a Graphics2D.addClip(Shape)
so that I could clip the graphics region by a near infinite number of
shapes. Same for intersect() and the like.
Would be nice to see the OpenGL statemachine style of rendering start
bubbling up to Java2D. Now that you're accelerating it via OpenGL,
expect to see a lot of requests :)
To unsubscribe, send email to firstname.lastname@example.org and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
email@example.com and include in the body of the message "help".