Lisp HUG Maillist Archive

Pinboard Flashing...

Hmmm... Well, I tried my own idea of managing the damaged regions myself, and then telling CAPI to invalidate some rectangle off port. CAPI does call back to the display callback routine, but then the clipping rectangle is preset to ignore all my drawing details. And attempting to set my own drawing mask with gp:with-graphics-state is wholly ineffective. So this idea won't work.

There are no mentions of drawing routines anywhere in my code. Mousing callbacks in response to user interaction only modify positions of objects, and never actually perform any drawing. They do, however, call gp:invalidate-rectangle, and that in turn causes my display-callback routine to run, which is the only thing that actually draws anything.

And lastly, using gp:clear-graphics-port is completely indiscriminate about restricting redrawing to damaged subregions. Instead, it completely wipes my graphics port. And whenever my mouse nears a movable object, which will be highlighted, the entire port goes blank, and can only be restored by using a screen refresh that calls gp:invalidate-rectangle -- to get the display callback routine to run. In other words, using gp:clear-graphics-port does not invoke the display callback routine. This is even worse than before.

I have a completely satisfactory display image constructed in a backing pixmap store. All I want to do is repaint portions of the visible graphics port directly from this backing image. I don't want anything else in preparation to the drawing -- like clearing the damaged region ahead of my blitting. That is what is causing the flashing...

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


Re: Pinboard Flashing...

Re: Pinboard Flashing... Is’nt it suffisant to copy the pixels from the offscreen port to the onscreen port with gp:pixblt ?

Denis



Le 8/10/07 15:53, « [NOM] » <[ADRESSE]> a écrit :

I have a completely satisfactory display image constructed in a backing pixmap store. All I want to do is repaint portions of the visible graphics port directly from this backing image. I don't want anything else in preparation to the drawing -- like clearing the damaged region ahead of my blitting. That is what is causing the flashing...


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

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

Re: Pinboard Flashing...

Is’nt it suffisant to copy the pixels from the offscreen port to the onscreen port with gp:pixblt ?


Well, I just tried that, and it behaves identically, in this regard, to copy-pixels. Apparently, copy-pixels also goes through GP transforms, while pixblt does not. So pixblt is certainly more efficient in this application.

I find that if I handle the screen redrawing directly from my code, using the backing pixmap, then updates which don't change position or size of objects on screen actually occur very beautifully. No flashing at all. Very fast.

But the moment I move an object, or resize it, the flashing becomes intolerable again. That can only mean either or both of two things:

1. Calling invalidate-rectangle invokes the display callback but issues a region clear first... or, 

2. changing the position of an object is the culprit here, doing a clear region along the way, and then calling invalidate.

We are soooo close! Just one last glitch. And if this is the trap in the maze, I'll have to resort to C code (ugh) to reinvent the whole graphics display process... I'd rather keep it all in (semi-)portable Lisp, at least portable to other hosts like OS X and Vista.

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 Oct 8, 2007, at 07:49, Denis Pousseur wrote:

Is’nt it suffisant to copy the pixels from the offscreen port to the onscreen port with gp:pixblt ?

Denis



Le 8/10/07 15:53, « [NOM] » <[ADRESSE]> a écrit :

I have a completely satisfactory display image constructed in a backing pixmap store. All I want to do is repaint portions of the visible graphics port directly from this backing image. I don't want anything else in preparation to the drawing -- like clearing the damaged region ahead of my blitting. That is what is causing the flashing...


-------------------------------------------------------
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:45 UTC