PDA

View Full Version : How to scroll scanline image data from the left to the right



newqtuser
16th December 2008, 01:12
Hi folks

Can anyone give me some tips on the best way to scroll image data across the screen from the left side of the screen to the right. I can currently draw image data top down using a qgraphicsscene and setting a label with each scanline i read and then calling scroll, but i need to draw vertically from left to right. The image data needs to be built off screen then as more lines are read i need to start scrolling it across the display untill its complete, then make it scroll off the right side of the display. Do i need to rotate the matrix to draw vertically or just swap my x,y cordinants? Also would a QAnimation and Qtimeline be good for the scrolling or would opengl be better as far as speed and looking smooth? Thanks for any help

aamer4yu
16th December 2008, 08:19
How about using QGraphicsItemAnimation and QGraphicsPixmapItem ?

wysota
16th December 2008, 08:22
You want to scroll the image or move its data?

newqtuser
16th December 2008, 14:38
I need to scroll the image itself. The image data is received over a socket. The image data is just an array with the pixel values and dimensions, as 16bit bmp. I will get probably 10 lines or so on each payload and i need to append this data to a qimage and begin scrolling it onto the screen as the data is recieved from the left side, once the image is completely built i need it to continue and move across the display till it goes off the display on the right side. Im not sure if qanimation will look smooth enough, and i cant have it flickering but still needs to be somewhat fast. Also wondering if bitblt in a paintevent should be used for this. Thanks