Hi Chris,

Thanks very much for your reply.

"You can pass int parameters to either of the Float or Double constructors ..."

You're right, although I thought you'd have to cast the values first?

"As for your second question ..."

Without anti-aliasing, I see no difference between a rectangle at 0 and one at 
0.99 (the x

coordinate) (this is true with anti-aliasing turned on as well, but I assume 
it's because there are

no curved areas). I do, however, notice a change with an ellipse, as you 
mentioned. There's a

difference in rendering between an ellipse positioned at 0 and one at 0.49. Is 
it because the

non-integer coordinates affect the result of calculating the position of the 
pixels within the arcs

of the ellipse? If this is true, then surely regular rectangles and lines would 
not be affected by

non-integer coordinates, unless perhaps they were transformed? In other words, 
shapes are rendered

at integer locations, but the rounding can be affected by the calculation of 
curves and

transformations? But then why would you choose to render a shape at a 
non-integer location in the

first place? I hope I'm not making a fool of myself here.

It also brings another question to my mind -- When should you use the float 
constructors, and when

should you use the double constructors? I assume double is more precise, but 
uses more memory? Would

it be used where accuracy is important, such as in CAD applications?

"The drawRect(), fillRect(), etc methods on the Graphics class are still your 
best bet ..."

OK, but this assumes you wish to position a shape in an integer location only?

*sigh* Maybe I should just forget about understanding this stuff.

"On Tiger, you pretty much have no choice but to use the two-pass technique you 
describe ..."

Actually, my technique is (clip, fillR, fillR, reset clip, drawRR) (5 steps, as 
apposed to 6).

"The behavior you're seeing where the corners are clipped off is caused by 
slight differences

between the clip region and the way the rounded rect shape is stroked ..."

Yeah, I think some of the anti-aliasing of the stroke is being rendered outside 
of the clip.

"1. Don't use drawRoundRect() to draw one-pixel tall horizontal lines."

Hmmm ... I never did that? Or are you joking?

Anyway, thanks again.

Regards,

D.
[Message sent by forum member 'dodger' (dodger)]

http://forums.java.net/jive/thread.jspa?messageID=115718

===========================================================================
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