|VerticalTextPainter update [message #1279263]
||Fri, 28 March 2014 13:28
| Dirk Fauth
Registered: July 2012
while working on the theme styling I noticed a negative effect using the VerticalTextPainter. It creates some blurry effect on the rendered text. Using a dark theme the text becomes almost unreadable. This seems to be related to the rotation logic. The current implementation renders temporarily to an image and rotates the image afterwards. The sharpening logic of the OS is then not correctly applied anymore.
Instead of rendering and rotating an image, I refactored the VerticalTextPainter to use SWT Transform. This way the blurry effect is gone.
For some fonts this might cause issues with automatic height calculation. The calculation is doing the same thing as before, but the rendering of the transformed rotated text seem to need some pixels more. Not sure where that comes from, seems to be OS related. As I have no solution on that, I kept the old implementation in NatTable core.
Now there are two implementations for rendering vertical text in a NatTable:
Uses SWT Transform
Uses GraphicsUtils (which renderes and rotates an image internally)
Dependent on font and other styling, choose the one that fits your needs the best.
These changes are available since SNAPSHOT >= 287
Powered by FUDForum
. Page generated in 0.01635 seconds