Colored TTF rendering
J J
azreal1977 at hotmail.com
Tue Nov 21 05:42:59 UTC 2006
Is this going into 3.9?
>From: Diego Gomez Deck <DiegoGomezDeck at consultar.com>
>Reply-To: The general-purpose Squeak developers
>list<squeak-dev at lists.squeakfoundation.org>
>To: The general-purpose Squeak developers
>list<squeak-dev at lists.squeakfoundation.org>
>CC: "José L. Redrejo Rodríguez"<jredrejo at edu.juntaextremadura.net>
>Subject: Re: Colored TTF rendering
>Date: Wed, 15 Nov 2006 10:21:22 +0100
>
>Hi,
>
>A just made a quick try[*] and it seems to work.
>
>I tried the CS in 3.9-7067 and I got this numbers:
>
> Before: 5782
> After: 539
>
>I also tried in a 3.8 with a lot of packages (the image I'm currently
>using for development) and the number are more impressive:
>
> Before: 12405
> After: 541
>
>Attached is the CS.
>
>Cheers,
>
>-- Diego
>
>[*] I only filed out the changeset created my Monticello in the
>installation of Multilingual-ar.17.mcz. This changeset seems to be in
>good order.
>
> > Diego Gomez Deck wrote:
> > > Do you have any code snippet to test (an compare) the TTF rendering
> > > speed?
> >
> > Sure. Try this:
> >
> > text :=
> > ('Hello World\' withCRs asText addAttribute: TextColor red),
> > ('Hello World\' withCRs asText addAttribute: TextColor green),
> > ('Hello World\' withCRs asText addAttribute: TextColor blue).
> > text addAttribute: (TextFontReference toFont:
> > ((TextStyle named: 'BitstreamVeraSans') fontOfSize: 24)).
> > morph := TextMorph new contentsAsIs: text.
> > form := Form extent: morph fullBounds extent depth: 32.
> > Transcript cr; show: (
> > [1 to: 1000 do:[:i| morph fullDrawOn: form getCanvas]] timeToRun
> > ).
> >
> > On my machine this results in:
> > Before: 8700 msecs
> > After: 750 msecs
> > And the speed difference is actually quite noticeable in interactions.
> >
> > Cheers,
> > - Andreas
>
><< TTFSpeedUp-dgd.1.cs.gz >>
>
_________________________________________________________________
Share your latest news with your friends with the Windows Live Spaces
friends module.
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mk
More information about the Squeak-dev
mailing list
|