[Cuis-dev] [ANN] Experiment with Cairo graphics [UPDATE]

Juan Vuletich JuanVuletich at zoho.com
Sun Oct 13 06:38:41 PDT 2019


I'd love to have this at the Cuis Smalltalk GitHub org!

Cheers,

On 10/12/2019 2:57 PM, Mariano Montone via Cuis-dev wrote:
> Hello.
>
> Just an update. Performance is much better now (because of image
> caching) and the segmentation bug in browser is side-stepped (not fixed,
> though). So, it is possible to use Smalltalk browsers.
>
> TODO: Better font rendering and image blending.
>
> Cheers!
>
> Mariano
>
> El 9/10/19 a las 13:49, Mariano Montone escribió:
>> Hello!
>>
>> I've doing some experiments with Cairo graphics in Cuis. I'm doing it
>> via FFI.
>>
>> If you want to have a look, you have to load these:
>> https://bitbucket.org/mmontone/mold/raw/master/Cairo.pck.st
>> https://bitbucket.org/mmontone/mold/raw/master/CairoMorphic.pck.st
>>
>> There's a Cairo FFI wrapping class, a CairoContext with fluid api, and a
>> CairoCanvas for Morphic.
>>
>> Note that I've spent only a couple of days on this, so it is not ready
>> for anything very useful yet, but I'm planning to try to use in a
>> diagrams library I'm building.
>>
>> Some interesting expressions to try:
>>
>> CairoCanvas displayWorld.
>> CairoCanvas displayWorldScaled: 0.8 at 0.8.
>> CairoCanvas displayWorldRotated: -10.
>>
>> To switch Display to Cairo canvas based one:
>>
>> CairoDisplayScreen install.
>>
>> IMPORTANT: there are segmentation faults when browser methods are opened
>> (because of a bug in TextComposition rendering), so open all classes
>> methods before trying the expressions above.
>>
>> Other issues: text rendering is very basic, uses Cairo toy api
>> cairo_show_text. And images don't get blended right.
>>
>> Have fun!
>>
>> Mariano
>>


-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich





More information about the Cuis-dev mailing list