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?

I dead here long time:)

致敬
向雅


2012/7/17 Stephan Aßmus <superstippi@xxxxxx>:
> 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 you "Face Big"(Chinan saying: seems no direct translation for
English, almost:
do a favor, do a honor)

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

Seems you do right:)
Comparison with the ScaledGraphics zoomTextout maybe a worth.
I attached it for hand.
The zoom TextLayout in last part of code.

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

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

I not know your result, maybe different version?
The ScaledGraphics just a reference.
There is a new Git repos.

Indeed, Draw2D have another text render, seems stop long, but really
different method.


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

Really good news!
Seems java really need a browser mode.  I guess you saw the new
JavaFX, dummy thing.
I wanna continue the talk but seems to far away, maybe on other list:)

>
> Best regards,
> -Stephan
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

Attachment: ScaledGraphics.java
Description: Binary data


Back to the top