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 > X-Original-To: [EMAIL PROTECTED] > Delivered-To: [EMAIL PROTECTED] > MIME-Version: 1.0 > Content-MD5: PLn8KH7UJFebiyLMr8lbpA== > Date: Thu, 14 Oct 2004 16:50:57 -0400 > From: Nancy DeLosa <[EMAIL PROTECTED]> > Subject: [JAVA2D] drawPolyline()-setting stroke width > Comments: cc: [EMAIL PROTECTED] > 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". =========================================================================== 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".
