Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29249 Discussions

how to erase the lines which I draw in QuickWin

doldolmom
Beginner
538 Views
Hello Steve
I get so much helpfrom this forum. Thanks!!
I drew some lines(let's say 10 lines)in QuickWin Application using MOVETO & LINETO.
I did some calculation based on the drawn lines, and now I don't need some of the lines, so I want to DELETE SOME (let's say 3 lines) of the lines which doesn't satisfy the criteria.
How should I do it? I don't want to use CLEARSCREEN cause it'll delete all the lines.
Following is part of my code.
.
.
.
OPEN(UNIT=4, FILE = 'OUTPUT.dat', STATUS='OLD', ACTION='READ', IOSTAT = ierror)
DO i = 1, 10
READ(4,*) nf_coor(i,1), nf_coor(i,2), nf_coor(i,3), nf_coor(i,4)
END DO
DO i = 1, 10
CALL SETLINESTYLE( Z'FFFF')
CALL MOVETO_W( nf_coor(i,1), nf_coor(i,2), wxy )
status = LINETO_W( nf_coor(i,3), nf_coor(i,4))
END DO
.
.
.
DO i = 1, 3
???????????
END DO
0 Kudos
3 Replies
onkelhotte
New Contributor II
538 Views
I believe the only way is to draw the line again with the background color.

Or you clear the screen and you redraw the 7 line you want to keep.

Markus
0 Kudos
doldolmom
Beginner
538 Views
Thanks for the tip. I already tried that and I thought it might be too tricky. But now I'm relieaved cause I got the confirmation from the expert. Thanks!!
0 Kudos
jimdempseyatthecove
Honored Contributor III
538 Views
FYI

Assume for the moment that in your drawing space that no lines intersect or overlay (e.g. writing characters or WingDing line segments). In this limited case you can erase the line by writing NULLs or rewriting the line using background color. Now consider what happens when lines intersect. Erasing one line by re-writing line with background color will erase the intersection point(s) of the other line(s). One technique to work around this (which is not suitable for all situations) is to draw the line using XOR. This presents the intersection of two lines as the XOR of the line color (e.g. two black lines on white background may result in white spot at intersection). For some drawings this is acceptible, for others it is not.

Jim Dempsey
0 Kudos
Reply