[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug awt/27947] Graphics2D buglet with rotated text

From: hendrich at informatik dot uni-hamburg dot de
Subject: [Bug awt/27947] Graphics2D buglet with rotated text
Date: 19 Jun 2006 10:03:30 -0000

------- Comment #3 from hendrich at informatik dot uni-hamburg dot de  
2006-06-19 10:03 -------
(In reply to comment #2)
> How does it rotate the text? I'm not seeing any problems when using
> Graphics2D.rotate(). 

Could you run jfig3.jar and confirm that creating rotated texts works for
you? This would probably indicate a problem with my freetype or my fonts.


1. <java> -jar jfig3.jar
2. Load the attached .fig file (fonttest.jar) - this segfaults for me.

1. <java> -jar jfig3.jar
2. Click the "T" (text mode) button on the left
3. Select one of the fonts via the "font" button on the bottom.
   (Helvetica and Courier work on my system, Times does not).
4. Click the "rotation angle" button a few times (rightmost button on the
   bottom attributes control panel) to select a non-zero rotation angle.
5. Click the left mouse button anywhere on the drawing canvas to place the
   text object.
6. Type some text (including digits and special chars etc) and verify that
   it is rotated.

The relevant code looks like this, where createCompoundTransform calls

  AffineTransform tmpTrafo =
         FigTools2D.createCompoundTransform( origTrafo, trafo );
      tmpTrafo.translate( basePoint.x,
                          basePoint.y );
      tmpTrafo.rotate( -attribs.fig_angle );
      tmpTrafo.translate( left, 0 );
      g2D.setTransform( tmpTrafo );

      if (s.length() > 0) {
        g2D.setColor( attribs.lineColor );
        g2D.setFont( font );
        g2D.drawString( s, 0, 0 );



reply via email to

[Prev in Thread] Current Thread [Next in Thread]