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

Problem with Screen refresh with Text and Graphic Output



I've been having some problems with printing text and drawing graphics
on the screen at the same time. I have written a arc-chart utility which
draws labeled arcs between nodes placed on the screen.  I first draw
the nodes spaced horizontally at the bottom of the screen.  Next, I draw
the arcs, which are actually cubic splines.  Next, I draw a filled rectangle
with gray-level 0 to clear out the area where my label will be.  Finally, I
draw my label, surrounding it with a border.

This procedure works fine when it is initially drawn.  The problem I have is
when the screen is refreshed.  I always thought refresh messages were supposed
to redraw ALL output in the order it was displayed.  As it turns out, I get all
of my text redrawn first, followed by my graphic output.  The result is that the
rectangle which I draw to prevent the arcs from covering the labels ends up
covering the labels itself.  Obviously, this is not ideal.

What is the word on the order of refreshing objects on the screen?  Is there any
way I can force the screen to do the right thing?  Or am I doing something wrong?

-- David Magerman
LINC Lab at the Moore School, University of Pennsylvania