Re: gnome-canvas scrolling



lytles@alphatech.com writes: 
> at all zooms, i would like
> 1. the left-most scroll to have the right edge of the image in the middle
>    of the window
> 2. the right-most scroll position to have the left edge of the image
>    in the middle of the window.
> 

So I think this means you want to set the scroll region to the size of
the image plus 1/2 the size of the visible area on all sides.

> I have tried many different things, but it seems that the meaning
> of (0,0) changes based on the zoom of the image. If the image is
> smaller than the window, then (0,0) seems to nearly center the image,
> but if zooming has made the size of the image larger than the screen,
> then (0,0) places the upper left corner of the full size image in the
> upper left corner of the window.
>

0,0 in canvas pixel coordinates (see my book
developer.gnome.org/doc/GGAD/ for explanation fo the coordinates) is
always the top left of the scroll region. If the visible region is
larger than the scroll region, then IIRC the canvas just centers the
scroll region in the visible region. It's hard to know what else the
canvas should do in this case...
 
Havoc



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