Note: What is attached below is a copy from the Apple java-dev mailing
list to provide additional insight into the problem:

I have started looking at solving this problem 3 ways:

1) Cheat and get a point on the bounding box and draw the line from that
point. It will look funky, but quite possibly no one but me will notice
since the arcs are only 10 pixels in width and height. I have a sneaking
suspicion this will be the fastest way until the number of shapes and links
being drawn gets large. Since this is something I expect it will be an
interesting control for the others.

2) Do a CAG adding all of the rounded rectangles together into one gigantic
clipping shape. This is probably.... Er definitely the easiest to code since
I'm already iterating through the RR2Ds anyways and can make this master
shape. I'll probably do that one before I go to sleep. Since I'm at a loss
as to how Java handles Areas and the documentation just isn't 'there' enough
this one is difficult to judge. I'm assuming that Java will have to do the
same clipping logic in 'java code' that I would have to do so this one is
likely going to be close to 1 in overall work and scalability.

3) A little more involved render of the lines to one buffered image, then
rendering a knockout pass to perform clipping in the frame buffer, then
blending that image with the buffered image that just has the buffered
images rendered. This will probably give a more constant performance over
large numbers of objects since the work is really being done by the graphics
hardware and there isn't any 'per object' computation being done.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to