Re: gnome-canvas, imlib, zoom



>  I´m using the gnome-canvas to overlay polynoms over a large image. To
>  verify that my algorithm is computing the right paramteres for the
>  polynoms I want to be able to zoom into the canvas. I used the
>  gnome_canvas_set_pixels_per_unit function. But that resize the whole
>  image in memory using tons of space and is a very slow process. Is
>  there a posibility to create a zoomed view only of an interested area
>  (like xzoom) without loosing the fine grained detail of the line
>  objects? 

Right now GnomeCanvasImage objects are always scaled when you change
the zoom factor in the canvas.  In some situations it may be useful to
specify that the image size is in pixels, not in canvas units, so that
the canvas will not scale the images (just like you can set line
widths in pixels or units; they don't get scaled with the former but
they are in the latter).  I have added an entry to my TODO list for
this.

But I guess you are talking about something different :-)

If you mean popping up a small window with a zoomed version of the
canvas, then it cannot be done right now.  It shouldn't be too hard to
hack the canvas to do it for you.  You basically have to pop up a
window and call the internal canvas' rendering functions with a new
scaling factor and all the offsets set to proper values.

I don't think this should be in the main canvas code, that is why I am
not offering to implement it :-)

Please tell me if you need help concerning the internals of the canvas.

  Federico



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