Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] TextLayout and GC advanced graphics on Windows (GDI+) buggy?

Hi,

On 16.07.2012 21:20, 向雅 wrote:
The eclipse list not other kind of list:) the guys will tell you in
wrong topos, the right room is newsgroup.(Wawu I not read news so
long)

The last couple of times people asked questions here, they most often got some help...

Maybe it's answer:
1)recompute the bounding according to zoom parameter and
resize of canvas, meanwhile
2)reevaluate the font size in favor of zoom parameter, then modify
style attribute objects, at last,
3)repaint OK.

My current work around / new strategy is to copy and "scale" the SpacedTextLayouts immediately before they are used for painting. That limits the overhead to just what's visible on the screen.

BTW:
1)Draw2D scaledgraphics.(zoom) method maybe help.

Draw2D (org.eclipse.draw2d ?) did come up several times in my searches for the problem, but it seems to be implemented on top of an SWT GC, so it wouldn't help I guess. What's more, the method to draw a TextLayout was unimplemented, at least in the version of the code I saw on the web.

2)You familiar with AGG, so maybe JNI AGG render and just blit result
image to backend buffer, maybe a idea(not so bad:).

Believe me, writing my own AGG based text rendering engine (respectively modifying/using the ones I wrote before) and using it via JNI has crossed my mind more than once. The SWT text rendering capabilities are really pretty limited for advanced stuff. I posted about some limitations here before...

Up until now, I was able to avoid it. But it is planned already for various reasons.

Best regards,
-Stephan


Back to the top