scrolling data problem

Just starting out? Need help? Post your questions and find answers here.
chippy73
User
User
Posts: 59
Joined: Wed Feb 16, 2005 6:11 pm
Location: S.W.Wales

scrolling data problem

Post by chippy73 »

Basically what I want to do is write pixel data to the first pixel line then move it down one pixel to line 2, then write some more data to line 1. So that I end up with a scrolling window of pixel data.

So,
1. write data to line 1
2. move lines 1 thru to 255, to lines 2 thru 256
3. write date top line 1
4. repeat 1 - 3

This is the code I am using so far but it fails to write one pixel down.

It is part of a procedure which gets called all the time the program is running.

Any comments very welcomed.

Alan

Code: Select all

; Compute result
For s=0 To #fft_SampleSize/2
  fv(s) = Sqr(reOut(s)*reOut(s)+imOut(s)*imOut(s))
  
Next s

If CreateImage(0,256,256)
CreateImage(1,256,256)
  StartDrawing(WindowOutput())
DrawingMode(0)
;ID=UseImage(0)
DrawImage(UseImage(0),0,0,256,256)
;DrawImage(UseImage(1),0,0,256,256)
StopDrawing()
EndIf

y=0

StartDrawing(WindowOutput())
DrawingMode(0)
  For s=0 To #fft_SampleSize/2 :; 256
    Plot(s,y,fv(s))
  Next s
;  StopDrawing()
  
CopyImage(0,1)
;UseImage(0)
GrabImage(0,1,0,0,256,255)  

DrawImage(UseImage(1),0,1,256,255)
StopDrawing()

EndProcedure
PB v3.94 PVXP v2.13 JaPBe v2.5.4.22
chippy73
User
User
Posts: 59
Joined: Wed Feb 16, 2005 6:11 pm
Location: S.W.Wales

Post by chippy73 »

Or maybe there is a totally different way to achieve what I want to do ?

Alan
PB v3.94 PVXP v2.13 JaPBe v2.5.4.22
Post Reply