Now the problem is that in the transparent sprite, the old poltted data persists even after the new data is plotted creating a mess on the screen. How do I clear old plotted data?
Here is my code
Code: Select all
Procedure DisplayData()
Define x.w
Define old_y1.w, new_y1.w
Define old_y2.w, new_y2.w
Define new_sprite.l
StartDrawing(SpriteOutput(1)) ;Starts Drawing on the sprite
Box(0,0,512,320,$000000)
old_y1 = 128
old_y2 = 128
DrawingMode(#PB_2DDrawing_Transparent) ; sets Text background transparent
For x=0 To 511
new_y1 = Read_buff(x)
new_y2 = Read_buff(x+512)
LineXY(x-1, old_y1, x, new_y1,#Red)
LineXY(x-1, old_y2, x, new_y2,#Green)
old_y1 = new_y1
old_y2 = new_y2
Next
StopDrawing() ;Stops drawing on the sprite
FlipBuffers()
DisplayTransparentSprite(1,0,0) ; display the sprite
EndProcedure
Any solution?