Lisp HUG Maillist Archive

Resizing graphic port

Hi,

working with an off-screen port, I encountered  this problem : the resizing
of graphic-port seems not possible (I found any function to do this), so the
only solution seems to destroy and recreate the port each time the pane
changes his size.
This is not a big problem for programmatic resizing, but for interactive
resizing this force the creation of a new port several times per seconds and
the response becomes very slow.

It will be great if a function to resize graphic port exists. Otherwise, I'm
looking for a solution where the port is not resized during interaction but
after. The problem there is that I really don't see how it's possible to
know when the resizing interaction is finished... The
interface-geometry-callback doesn't give me any information about this, and
there is no capture of events at interface level so I can't get some
mouse-release event to deal with.

Anybody encountered the same type of problem ?

Thanks

Denis



-------------------------------------------------------
Denis Pousseur
70 rue de Wansijn
1180 Bruxelles, Belgique

Tel : 32 (0)2 219 31 09
Mail :  denis.pousseur@gmail.com
-------------------------------------------------------



Re: Resizing graphic port

Hi Denis,

The solution I found for this sort of thing, where the user is manually resizing the window, is to grab an image (not a pixmap) of the window contents, and then redisplay that image at various scale factors as the user drags the window.

I use a timer with 100 ms timeout, that gets continually re-triggered while the user is dragging. After the dragging ceases for at least this duration, the timer finally times out and causes a new pixmap to be created and the old image to be destroyed.

Images can be resized on display, but pixmaps cannot. Or so that's how I have found things to work.

David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ  85750

email: dbm@refined-audiometrics.com
phone: 1.520.390.3995
web: http://www.refined-audiometrics.com


On Nov 29, 2007, at 01:36, Denis Pousseur wrote:


Hi,

working with an off-screen port, I encountered  this problem : the resizing
of graphic-port seems not possible (I found any function to do this), so the
only solution seems to destroy and recreate the port each time the pane
changes his size.
This is not a big problem for programmatic resizing, but for interactive
resizing this force the creation of a new port several times per seconds and
the response becomes very slow.

It will be great if a function to resize graphic port exists. Otherwise, I'm
looking for a solution where the port is not resized during interaction but
after. The problem there is that I really don't see how it's possible to
know when the resizing interaction is finished... The
interface-geometry-callback doesn't give me any information about this, and
there is no capture of events at interface level so I can't get some
mouse-release event to deal with.

Anybody encountered the same type of problem ?

Thanks

Denis



-------------------------------------------------------
Denis Pousseur
70 rue de Wansijn
1180 Bruxelles, Belgique

Tel : 32 (0)2 219 31 09
Mail :  denis.pousseur@gmail.com
-------------------------------------------------------




Re: Resizing graphic port


Le 29/11/07 13:23, « [NOM] » <[ADRESSE]> a écrit :

> I use a timer with 100 ms timeout, that gets continually re-triggered while
> the user is dragging. After the dragging ceases for at least this duration,
> the timer finally times out and causes a new pixmap to be created and the old
> image to be destroyed.

Hi David,

I tough about something with timers but was not sure about the way to do it..
I looked for the moment the user release the mouse but, in fact, the moment
he makes a pause of min 100 ms is as well.

Thanks for the hint !

Best

Denis

-------------------------------------------------------
Denis Pousseur
70 rue de Wansijn
1180 Bruxelles, Belgique

Tel : 32 (0)2 219 31 09
Mail :  denis.pousseur@gmail.com
-------------------------------------------------------



Updated at: 2020-12-10 08:44 UTC