Re: pictures



On Tue, Feb 15, 2011 at 8:45 AM, Alexander Larsson <alexl redhat com> wrote:
> The height/width stuff makes this very much a pixel-storage-based kind
> of picture, and doesn't ideally describe a vectorized image, like say an
> svg, where there might be no "natural" size in terms of pixels.
>
> How do you intend to handle these? (Just pretend that they have some
> size is one answer, I'm just wondering if you've thought about this
> case.)
>
The same way gdk-pixbuf does it essentially: Allow you to specify a
size and if you don't, use the most natural one. I'm probably also
gonna at a ResizablePicture interface and implement it in the SVG
loader so that you can live-resize an SVG that you loaded.

I thought a bit about allowing unsized pictures, but it didn't make
sense to me. First, from looking at the librsvg API, it seemed to me
that its developers try very hard to force a size on the SVG, even if
there is none. Second, you need a size for interacting with a toolkit
so that the toolkit can layout its window according to the size. (From
the SVG perspective, this is very different from web or print. There,
a size is predefined and you fill it as best as you can. Smething like
width=100% would not make sense in GTK for example.)

Benjamin


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