Igor, what does newSurface: do?, in the context of Cairo. How do you render the contents of the Cairo surface to the Display? Or are you using the writeToPng->readFromPng to Form->Display Form mechanism.
I was planning to use, NBCairoSurface>>getData:, which returns a pointer to the data, and simply update the Display contents with the surface's data. Fernando On Tue, Dec 20, 2011 at 11:09 PM, Stéphane Ducasse <[email protected]> wrote: > Alex normally you will just use athens and you will get a zoomable canvas :). > So mondrian should not use Cairo (just athens. Athens defines an API and you > will be able to have multiple back ends > and your code should run the same on cairo or balloon (may be degraded in > balloon). but your code will not be different. > > Stef > >> Your work is truly important! >> I plan in the long term to make Mondrian and Roassal use Cairo. This has >> been on my todo list for quite some time already... >> >> Alexandre >> >> On 20 Dec 2011, at 14:56, Igor Stasenko wrote: >> >>> We binding an Athens API for Cairo library. It fits pretty well as a >>> backend to API. >>> >>> Today i got some basics working. >>> Mostly, the functionality covered by: >>> >>> AthensCairoSurfaceExamples example1 >>> and >>> AthensCairoSurfaceExamples example2 >>> >>> which drawing nothing fancy but just rectangle(s) with solid color. >>> >>> example2 >>> " >>> self example2 >>> " >>> >>> | surf | >>> >>> surf := self newSurface: 100@100. >>> >>> surf drawDuring: [:can | >>> surf clear. >>> >>> can setPaint: Color blue. >>> >>> can drawShape: ( >>> can createPath: [:path | >>> path >>> absolute; >>> lineTo: 50@0; >>> lineTo: 50@50; >>> lineTo: 0@50 >>> ]) >>> >>> ]. >>> >>> Display getCanvas drawImage: surf asForm at: 0@0 >>> >>> >>> P.S. Stef says that Athens API is quite cool :) >>> >>> -- >>> Best regards, >>> Igor Stasenko. >>> <Screen Shot 2011-12-20 at 6.56.22 PM.png><Screen Shot 2011-12-20 at >>> 6.57.04 PM.png> >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> > >
