Create bitmap from array
Posted: Tue Jan 18, 2011 7:01 pm
How do I create a bitmap from an arry and plot that as a brush or sprite?
Given I want to do some kind of oscilloscope I now draw lined from one sample point of my array to the next.
But drawing lots of lines (499/125ms) is rather cpu time intensive, hence I want to precalculate a bitmap out of my sample and plot it as one single brush. Unfortunately I don't have a clue how to do this. Any hints?
Given I want to do some kind of oscilloscope I now draw lined from one sample point of my array to the next.
Code: Select all
For k=0 To 498
last_temp_o=temp_o
m=k*5
temp_o=noise[m+2]+noise[m+4]
temp_o=temp_o/4
Line (k+12, 180+temp_o,k+12,180+last_temp_o, $00cc80)
If k<415
Line (k+511, 180+oszidata[k],k+511,180+oszidata[k+1], $00cc80)
EndIf
oszidata[k]=temp_o
Next