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

Mariano Montone marianomontone at gmail.com
Sat Oct 12 10:57:22 PDT 2019


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
> 



More information about the Cuis-dev mailing list