Colored TTF rendering
Klaus D. Witzel
klaus.witzel at cobss.com
Wed Nov 15 09:37:55 UTC 2006
Got the ~same~ ratio in the Squeak-dev .image,
Thank you both!
On Wed, 15 Nov 2006 10:21:22 +0100, Diego Gomez Deck
<DiegoGomezDeck at consultar.com> wrote:
> 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.
> -- 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.
>> - Andreas
More information about the Squeak-dev