Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » VerticalTextPainter update
VerticalTextPainter update [message #1279263] Fri, 28 March 2014 13:28
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi everybody,

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:

- VerticalTextPainter
Uses SWT Transform

- VerticalTextImagePainter
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

https://bugs.eclipse.org/bugs/show_bug.cgi?id=431482

Greez,
Dirk
Previous Topic:Minimum number of rows visible
Next Topic:NatTable : Table level validations (continued)
Goto Forum:
  


Current Time: Fri Apr 26 15:41:21 GMT 2024

Powered by FUDForum. Page generated in 0.03621 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top