Re: interactive map?
- From: John Ellis <johne bellatlantic net>
- To: gtk-list redhat com
- Subject: Re: interactive map?
- Date: Sat, 2 May 1998 06:36:43 -0400
tom wrote:
> >> - is there a somewhat simple and elegant way to automatically scale the
> >> map if the window is resized? to allow only proportional resizes of the
> >> window?
> JA> Don't know, using imlib might be your best bet. Although I've haven't
> JA> used this yet.
>looks like it. i've ripped apart electric eyes today and created a new gtk
>widget that loads an image file and displayes it with automatic resize and
>events. if anyone else is interested, i can upload it somewhere.
>
>however, i'd still love to do proportional resizes, or rather: restrict the
>user to those. anyone done something like that?
What do you mean by a proportional resize?
If you mean simply resizing the image and keeping it's aspect, you might want to
have a look at the way I did it. I use Imlib to load and render the image. The
code can be found at:
http://www.geocities.com/SiliconValley/Haven/5235/
I used a table and a drawing area to keep the image centered within the window.
However, if you mean keep the aspect of the image and resize the window to fit
around the image. You could catch the "size_allocate" signal from the image and
set the size of the window accordingly. The only problem here is the window will
behave 'weirdly' as it snaps to the aspect of the image when the window is
resized by the user.
--
John Ellis <gqview@geocities.com>
http://www.geocities.com/SiliconValley/Haven/5235/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]