It's hard to know what is going on here without knowing what the transform
is at the time of the drawPolyline call since the line width is relative to
the current transform.  Do you have an isolated standalone test case for
this?

                                       ...jim

--On Thursday, October 14, 2004 4:50 PM -0400 Nancy DeLosa
<[EMAIL PROTECTED]> wrote:

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".

Reply via email to