cool
On Sep 25, 2009, at 7:19 PM, Ken Treis wrote: > Hi Damien, > > Yes it definitely works -- at least for me, on Mac OS X. Recent VMs > from John McIntosh have the plugin already, though on the mac it > only searches for libraries in a few select places and it doesn't > accept absolute paths. Hopefully this will be resolved soon; for now > I've symlinked the library into my Squeak VM's plugins folder. > > On Linux you may have to compile a VM yourself to get the plugin; I > know it's in the VM source tree. > > For a quick demo, try: > >> |image cr backgroundGradient textGradient| >> image := CRImageSurface format: CRFormat argb32 extent: 3...@200. >> cr := image context. >> backgroundGradient := CRLinearGradient from: 0...@0 to: 1...@200. >> backgroundGradient addStopAt: 0 color: Color white. >> backgroundGradient addStopAt: 1 color: Color lightGray. >> cr >> source: backgroundGradient; >> paint. >> cr moveTo: 3...@100. >> cr >> selectFontFace: 'Sans'; >> fontSize: 40. >> cr textPath: 'Hello, World!'. >> cr >> source: Color green; >> strokePreserve. >> textGradient := CRLinearGradient from: 0...@50 to: 3...@50. >> textGradient addStopAt: 0 color: Color blue alpha: 0.2. >> textGradient addStopAt: 1 color: Color blue alpha: 0.8. >> cr >> source: textGradient; >> fill. >> image writeToPng: '/Users/kdt/Desktop/hello.png'. > > This isn't anything super exciting to look at, but if you've got the > IA32ABI plugin and have set up CRLibrary class>>libraryPath to point > to the Cairo library, you should be able to see the output > (attached). I'll try to post a more impressive demo soon. > > > Ken > > On Sep 25, 2009, at 2:08 AM, Damien Cassou wrote: > >> Hi Ken, >> >> I'm going to have 4 students working during 4 months on Smalltalk. I >> would like to get a Cairo working implementation. What about >> yours/Travis'? What can we do with it? Can we draw something in >> Pharo? >> Does it work? >> >> Thank you >> >> -- >> Damien Cassou >> http://damiencassou.seasidehosting.st >> >> "Lambdas are relegated to relative obscurity until Java makes them >> popular by not having them." James Iry > > -- > Ken Treis > Miriam Technologies, Inc. > <hello.png>_______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
