Re: GdkPixbuf vs. Cairo, new image library needed?



Hi,

Milosz Derezynski wrote:
I've been thninking about this issue for some while now as well, and I've written (in gtkmm straight, so i didn't attempt to provide patches yet) a CairoImageSurface cellrenderer, and a few miscellaneous widgets which render directly a Cairo ImageSurface to a drawable instead of doing roundtrips. The renderer is a drop-in replacement for CellRendererPixbuf, it also has a pixbuf property, in which case it will render just that, otherwise it's possible to make it render imagesurface directly, or construct some in a cell data function.

In GTK itself it's probably best to add a "surface" property to RendererPixbuf instead of adding a new object ... (should decide on the name of the "surface" property and use it consistently in GtkImage, etc. also)

The name of RendererPixbuf ends up sort of weird, should have been RendererImage, but that's life I guess.

There is however one more problem which wasn't discussed yet in this thread: Widget insensitivity and the gtk style engines. The Pixbuf cellrenderer uses the gtk style engine to render its state when insensitive. It also uses a "gtkcellrendererpixbuf" detail to the style engine, and (thinking of Aaron Bockover's blog post about "Suboptimal Theming") possibly checks if the "widget" arg passed to it is a TreeView as well (i didn't check).

I can't think of a good solution here other than modifying all the themes. Maybe fixing just a few most popular engines would cover most users?

Havoc




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