'I want to move a line across a screen, so I need to 'undraw' 'the line that was there when I move to a new location.
'Is there a way to draw-undraw an entire line (or shape)?
'Surely there's a better way than pixel by pixel!!!
'For now, this works, but it's slow!
'this section sets each pixel in the line back to what it was
'if the (0) part of the array shows we drew a line
If ishapes&(0) Then
ishapes&(0)=0
For j=1 To wline
Graphic Set Pixel (ixloc,wline-j) , ishapes&(j)
Next
End If
'-------------------------
'this section prepares to draw a line
'whether or not the previous one exisited
'it saves what was in each pixel to the array
'then it draws a line in the new location
ixloc=ixleft+(ixprint-ix1)*ixs 'find x axis
ishapes&(0)=1'set pre condition to undraw it
For j=1 To wline
Graphic Get Pixel (ixloc,wline-j) To ishapes&(j)
Next
Graphic Style 2
Graphic Line(ixloc, wline-1)-(ixloc,wy0),%Red
'Is there a way to draw-undraw an entire line (or shape)?
'Surely there's a better way than pixel by pixel!!!
'For now, this works, but it's slow!
'this section sets each pixel in the line back to what it was
'if the (0) part of the array shows we drew a line
If ishapes&(0) Then
ishapes&(0)=0
For j=1 To wline
Graphic Set Pixel (ixloc,wline-j) , ishapes&(j)
Next
End If
'-------------------------
'this section prepares to draw a line
'whether or not the previous one exisited
'it saves what was in each pixel to the array
'then it draws a line in the new location
ixloc=ixleft+(ixprint-ix1)*ixs 'find x axis
ishapes&(0)=1'set pre condition to undraw it
For j=1 To wline
Graphic Get Pixel (ixloc,wline-j) To ishapes&(j)
Next
Graphic Style 2
Graphic Line(ixloc, wline-1)-(ixloc,wy0),%Red
Comment