Balloon Issues
Ned Konz
ned at squeakland.org
Sun Jan 9 17:18:08 UTC 2005
On Sunday 09 January 2005 8:00 am, Michael Latta wrote:
> I hope you are creating an abstract API at some level. At the plugin
> level would be great, but at some level would be very good. This would
> allow a subclass or alternate plugin to be developed for Quartz for
> example. So if there could be a focus class like Canvas is now, we
> would have a general API that could evolve to other graphics
> environments and engines. If you have no interest in this, then making
> your contribution stand-alone so someone else can package it as a
> canvas or other abstract API would be great.
My first version is just going to mirror the Cairo API itself in Squeak.
This is actually a general purpose drawing API; the Cairo design is such that
individual backends (for instance a Quartz or PDF backend) can be used for
actual image production.
My focus has been on the Cairo API itself; actual integration with Squeak has
so far consisted of rendering to bitmaps in (separately allocated) memory.
There is a plugin method for copying these back and forth to Forms.
Other backends that are written or are being written now (not by me) include:
* Quartz
* XWindows (XDrawable)
* SVG
* Windows GDI
* PDF
* Postscript
* PNG
* Glitz (using OpenGL; can render to GL textures, I believe)
Give the Cairo API a look (note that it is still somewhat in flux; for
instance, there is discussion going on right now on the cairo developer's
list about memory allocation/reference counting semantics, as well as which
of the Porter/Duff operations really make sense to expose to programmers).
There may also be some people working on retained-mode graphics based on this
API; this would improve the speed of (re) rendering widgets, etc.
The Mono project and others are basing their graphics work on Cairo.
http://cairographics.org/introduction
The API is described by the Cairo header file. Unfortunately, there's no real
documentation much past this except for some slides, a small tutorial, and
some example snippets. Note that it was changed last on 1/5/05.
http://cvs.cairographics.org/cairo/src/cairo.h?view=markup
--
Ned Konz
http://bike-nomad.com/squeak/
More information about the Squeak-dev
mailing list
|