[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: |
24 Oct 2006 12:58:35 -0000 |
------- Comment #8 from hendrich at informatik dot uni-hamburg dot de
2006-10-24 12:58 -------
(In reply to comment #6)
Hello Francis, thanks for your comment and the bugfix. I just tested
classpath cvs 2006.10.23 with jfig, and the bug seems indeed fixed.
I am closing this bug.
It looks like hinting is disabled for the rotated texts? Some rotated
strings look a bit irregular. Also, rendering is still a bit too slow
for productive use, but this is probably due to jamvm...
> From the Java API, under Graphics2D.setTransform(): "WARNING: This method
> should never be used to apply a new coordinate transform on top of an existing
> transform because the Graphics2D might already have a transform that is needed
> for other purposes, such as rendering Swing components or applying a scaling
> transformation to adjust for the resolution of a printer.
>
> To add a coordinate transform, use the transform, rotate, scale, or shear
> methods."
>
> I suspect our treatment of the internal Graphics2D transform is more strict
> than Sun's, thus why directly using setTransform() works on Sun but not
> Classpath...
>
Thanks for pointing out the warning in the JDK API docs to me, which
I didn't remember. However, my code first stores the original transform,
calculates a new transform based on preconcatenate(), calls drawString()
and finally restores the original transform. This is the same as calling
translate()/scale()/rotate() etc. and should be safe, unless some other
thread modifies the Graphics (and transformation) while a paint is
in progress... Also, it seems strange that translation and scale were
preserved, while the rotation got lost.
--
hendrich at informatik dot uni-hamburg dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27947