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

Juan Vuletich JuanVuletich at zoho.com
Wed Oct 9 12:37:53 PDT 2019


Very nice Mariano!

I'd like to see it complete enough to be able to completely replace the 
BitBlt Canvas. It would also be great to have the same API as 
VectorCanvas, so Vector Graphics Morphic code can be the same on either 
backend.

Cheers,

On 10/9/2019 1:49 PM, Mariano Montone via Cuis-dev wrote:
> 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