[q] about deleting line in photon graphic function

Hello…

Would you please help me, developers?

I’m using photon graphic functions and raw-draw.
Fistly, let’s say, there’s a background image, graph or STH.
Draw a line and then
restore background like nothing happened.


(e.g.)
//back ground image
draw_background image();
//draw line
PgSetStrokeColor(Pg_BLACK);
PgDrawILine(100,100,200,200);

//effect such like deletion of the line
//in other words, restore the original background.
How???


Are there any methods to perform that function?

Thanx in advance…

KJ

ppojung@yahoo.co.kr

ppojung <ppojung@yahoo.co.kr> wrote:

Hello…

Would you please help me, developers?

I’m using photon graphic functions and raw-draw.
Fistly, let’s say, there’s a background image, graph or STH.
Draw a line and then
restore background like nothing happened.

If you’re using the Pg*() functions to do your drawing, there is
nothing responsible for redrawing your backdrop. That
functionality comes when you encapsulate the backdrop into a
widget (a PtLabel of image type, perhaps?)

(e.g.)
//back ground image
draw_background image();
//draw line
PgSetStrokeColor(Pg_BLACK);
PgDrawILine(100,100,200,200);

//effect such like deletion of the line
//in other words, restore the original background.
How???

You’ll have to either:
a) encapsulate the various elements (lines, backdrops, etc.)
as widgets, or
b) if you’re doing this work in a PtRaw widget, write the code
yourself that “remembers” what the pattern you want is, and
then redraws it completely or in part when it is damaged in
some way

I hope this helps.


Norbert Black
QSSL Training Services