gnomecanvas wish list item



All,

A friend of mine is writing a little "directory size browser" (which
gives a radial display of the sizes of subdirectories of the current
directory. There's one for win32 & kde, he's looking at doing a gnome
version in python). So I pointed him in the direction of gnomecanvas
rather than using a raw drawing area.

I was looking into it and I noticed that people seem rather dissatisfied
with the current api/implementation and are in the mood to
refactor/replace it. So if it's up for discussion here's my suggestion:

Seeing as SVG is the in thing, how about letting a gnome/gtkcanvas item
group be constructed from an SVG file? This is the same principle as
libglade with gtk. It doesn't need to accept the full svg language, just
a subset that corresponds to the features that the canvas supports. The
api would be something like the libglade api with basically two methods,
1: generate a canvas item group from an svg stream
2: get a reference to a canvas item corresponding to a named svg
element.

It should be useful for the same reason that libglade is useful; that
often some scene has many static elements and only a few elements that
need to be programtically manipulated. So it would be nice to use some
vector graphics editor to create most of the image and just name a few
elements that the program will need to modify.

Serialising a item group to a svg file might be nice, but is probably
less important.

It doesn't need to be complete to be useful, for example the canvas
allows you to embed widgets which obviously can't be serialised to an
svg file, however there is likely a significant subset of canvas users
that stick to using canvas items that could be loaded/saved from/to svg
files for it to be a useful feature.

One might hope that it could be implemented in an extensible form, ie we
start with a basic collection of canvas items that only cover a small
subset of the svg language and add new items as and when they prove to
be useful.

Of course this idea is independent of weather this future gtkcanvas is
based on the existing libart version or one using cairo or whatever.

Duncan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]