Hi Nancy,
The issue you encountered here is related to bug report #4114921 which asks for a way to scale coordinates independently of things like the line width. This isn't really a bug since the current system scales both together "by design", but we could potentially add new capabilities to make this easier in the future. Meanwhile, the bug report may give you some added perspective on the issue...
...jim
--On 10/15/04 11:19:32 AM -0400 Nancy DeLosa wrote:
Thank you for the responses to my email. It turns out that my stroke width was too small. I needed to scale the stroke width by the scale factor that was in my AffineTransform. It is working now.
Thanks again, Nancy DeLosa
Date: Thu, 14 Oct 2004 16:50:57 -0400 From: Nancy DeLosa <[EMAIL PROTECTED]> Subject: [JAVA2D] drawPolyline()-setting stroke width To: [EMAIL PROTECTED]
Hi,
I have an application that draws lines into a BufferedImage. I would like to set the line width to 2, but it does not work.
The following is a code snipet. Assume bufferedImage is a BufferedImage with an IndexedColorModel and there is a AffineTransform object tx.
Graphics2D g2 = bufferedImage.createGraphics();
AffineTransform savedTx = g2.getTransform(); g2.transform( tx ); g2.setPaint( color ); g2.setStroke( new BasicStroke( 2 ) ); g2.drawPolyline( x, y, nPts ); g2.setTransform( savedTx );
I looked on the java.sun.com web site and a number of people have asked this question, but no one has responded.
I would appreciate any help you can give me. By the way I am using Java 1.4.2.
Thanks, Nancy DeLosa
=========================================================================== 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".
