I've implied using meta-programming,in order to have a uniform protocol in the abstract Canvas. AthensCanvas>>transformDescribedBy: aName self perform: ( aName , 'Transform' ) asSymbol . But i see that your approach is simpler, there's no need for a uniform protocol because when you are using a particular AthensCanvas you are fully aware of that! Regarding the build, after a lonnnngg series of errors, i also managed to build universal binaries of Cairo, using MacPorts (brew just doesn't ease the task of creating 32 bit libraries). sudo port cairo +universal, worked for me, taking at least 30 min to build. ATTENTION: Before entering the port cairo install command, I've had to manually install appleGcc4.2, found @ [1] (file name gcc-42-5666.3-darwin11.pkg. Given that i have Lion, XCode4.2, and if you just allow macports to build appleGcc4.2, it will run a process that consumes resources and finally stalls your computer! I've attached a screen shot that may help somebody else, for setting up the examples. Using NativeBoost Cog VM for Mac, downloadable from NativeBoost site or Jenkins. Great work Javier, and Igor! I'm looking forward to implement a Text editor using Cairo+Pango + "my new morphic". Fernando [1] http://r.research.att.com/tools/ On Tue, Nov 29, 2011 at 5:02 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 29 November 2011 16:12, Fernando Olivero <fernando.olivero@usi.ch> wrote:
I get the point now, something like the brushes in seaside. Thanks for the explanation.
Regarding the protocol, did you consider reusing the same idea, but one step before, as in the following:
pathTransform := canvas transformDescribedBy: 'path'. pathTransform scaleBy: 0.5.
imageTransform := canvas transformDescribedBy: 'image'. imageTransform scaleBy: 0.5.
Maybe add the following for documentation:
AthensCairo>>availableTransforms        ^ #('path'. 'image'. )
AthensOpenGL>>availableTransforms        ^ #('modelView'. 'projection'. )
This would unify the canvas protocol, for all the available rendering engines.
This sounds more complicated. We can map different matrices in different engines to Athens. So, it is not necessary for client code to know which of them are there, because then code will be filled with tons of  #ifTrue: branches ... .
-- Best regards, Igor Stasenko.