Hi Andries, Have you tried enabling antialiasing? Without that, there's no way to have a smooth transition between integral line widths (after all, you can't fill fractional parts of pixels). With antialiasing, you can at least trick the eye into thinking that there are fractional line widths. Enabling antialising may be a reasonable solution for larger icon sizes, but you may not like it for smaller sizes (like 16x16); typically icon designers are pretty fussy about the placement of each pixel at small sizes, and antialiasing at those small sizes may make the icon look "fuzzy". You could consider using antialiasing for certain size (like the example you mention where line widths are non-integral), but leave it disabled for smaller sizes where you want/need more control.
Hope this helps, Chris On Nov 3, 2006, at 3:14 AM, [EMAIL PROTECTED] wrote:
Hi, I'm trying to build a scalable image. When I interactively enlarge my icon, some discrete 'jumps' happen. e.g when the line width is 3.4 or 3.5. In the first case I have to give a 3 and in the last case a 4 to the graphics object. So when I enlarge my icon, suddonly the line width becomes 25 percent thicker. Is there a way to smoothen this? The same thing happens with the shapes. This is even a much bigger problem. However the cause is the same: integers. Even when I use shapes (and doubles) instead of drawRectangle or drawPolygon... in Graphics2D, the icons remains to have sudden 'jumps' as I scale them. Does anyone has some ideas? [Message sent by forum member 'andries_demont' (andries_demont)] http://forums.java.net/jive/thread.jspa?messageID=170058 ====================================================================== ===== 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".
=========================================================================== 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".