scrolling data problem
Posted: Mon Mar 06, 2006 2:14 pm
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
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