🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
1 messages
1 total messages Started by Barry King Tue, 30 Apr 1991 13:50
GpiCorrelate performance
#2599
Author: Barry King
Date: Tue, 30 Apr 1991 13:50
30 lines
2010 bytes
I'm developing a PM graphics application under OS/2 v1.3.  I am using 
chained segments (retained graphics) where each segment contains a 
graphics object.  I use GpiCorrelateChain to detect hits on objects for 
moving/deleting.  This works fine except that as the number of segments 
in the chain increases (or the complexity of a graphics object in a 
segment is high) the correlation operation can take up several seconds.
This is on a 386/33 machine, BTW.
 
My question is, is there a better way to do this using the Gpi functions 
and get some decent performance?  I'd like to avoid writing my own 
routines to manage and detect the graphics objects.
 
Also, when redrawing a delected object, I only invalidate the bounding 
rectangle of the object.  I then use GpiCorrelateChain again with the 
pick aperature set to the bounding rectangle for the update region and 
only redraw those segments which are in the pick aperature.  This works 
okay too but, again, GpiCorrelateChain takes to long and a side effect is 
that the heirarchy of the redrawn objects is not retained.  That is, they 
aren't drawn in the original order.  I could maybe use GpiSetPriority - 
type function to set the priority of a segment and then draw the segments 
in priority order but I'd have to sort the segment tags first - kind of a 
pain but doable.
 
Maybe the application will have to perform it's own object management?  
Hell, any suggestions would be welcome.
 
Thanks!

Barry King             ersys!bking@nro.cs.athabascau.ca
Edmonton Remote Systems:  Serving Northern Alberta since 1982
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads