Click here to Skip to main content
15,900,724 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionHow to shift a bitmap efficiently (Spectrogram Application) [modified] Pin
bimbambumbum19-Sep-10 13:53
bimbambumbum19-Sep-10 13:53 
AnswerRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
Luc Pattyn19-Sep-10 15:43
sitebuilderLuc Pattyn19-Sep-10 15:43 
GeneralRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
bimbambumbum19-Sep-10 16:55
bimbambumbum19-Sep-10 16:55 
GeneralRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
Luc Pattyn19-Sep-10 17:11
sitebuilderLuc Pattyn19-Sep-10 17:11 
GeneralRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
bimbambumbum19-Sep-10 17:32
bimbambumbum19-Sep-10 17:32 
AnswerRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
Luc Pattyn19-Sep-10 17:48
sitebuilderLuc Pattyn19-Sep-10 17:48 
GeneralRe: How to shift a bitmap efficiently (Spectrogram Application) Pin
bimbambumbum19-Sep-10 17:57
bimbambumbum19-Sep-10 17:57 
AnswerRe: How to shift a bitmap efficiently (day 2) [modified] Pin
Luc Pattyn20-Sep-10 16:14
sitebuilderLuc Pattyn20-Sep-10 16:14 
Hi Tom,

1.
I studied the article High Speed, Feature Rich, and Easy-To-Use Graphs and Charts[^] a bit; it has a Plotter class which is a UserControl displaying a number of traces, each trace defined as a sequence of points. So there is no bitmap, no image, involved at all. It basically is vector graphics, which makes it high-performance.

2.
I did some experiments with a bitmap-based plotter-like Panel, where one column of pixels would be updated at a time, using the circular buffer approach we discussed earlier. It is double-buffered to avoid flickering, and it works remarkably smooth, in fact it looks much better than the other article's demo, however I suspect that is due to the demo having fewer data points than the plotter is wide, causing the graph to jump all the time.

At 512*512 my plotter happily handles 30 updates (frames) per second, using between 10 and 15% of a middle-of-the-road dual-core (I use both cores, as one executes the main thread, i.e. the painting, whereas the other calculates the new column in a BackgroundWorker).

Yet I am convinced it takes too much CPU load for the net result. So I think I should look into other technologies, being OpenGL and DirectX. And I will, in time.

3.
For the moment, I'm convinced if all that gets shown basically is a line graph, one should not resort to images at all. It will be much more lightweight when the graphs are drawn straight from a sequence of points, no matter what technology is used for painting images.
ADDED
Of course, when doing so, there is no problem whatsoever to make it scroll.
/ADDED

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
modified on Monday, September 20, 2010 10:43 PM

GeneralRe: How to shift a bitmap efficiently (day 2) [modified] Pin
bimbambumbum20-Sep-10 17:54
bimbambumbum20-Sep-10 17:54 
GeneralRe: How to shift a bitmap efficiently (day 2) Pin
Luc Pattyn20-Sep-10 18:09
sitebuilderLuc Pattyn20-Sep-10 18:09 
GeneralRe: How to shift a bitmap efficiently (day 2) Pin
bimbambumbum21-Sep-10 11:23
bimbambumbum21-Sep-10 11:23 
GeneralRe: How to shift a bitmap efficiently (day 2) [modified] Pin
Luc Pattyn21-Sep-10 11:41
sitebuilderLuc Pattyn21-Sep-10 11:41 
GeneralRe: How to shift a bitmap efficiently (day 2) Pin
bimbambumbum21-Sep-10 11:45
bimbambumbum21-Sep-10 11:45 
AnswerRe: How to shift a bitmap efficiently (day 2) Pin
Luc Pattyn20-Sep-10 18:29
sitebuilderLuc Pattyn20-Sep-10 18:29 
GeneralRe: How to shift a bitmap efficiently (day 2) Pin
bimbambumbum22-Sep-10 13:01
bimbambumbum22-Sep-10 13:01 
GeneralRe: How to shift a bitmap efficiently (day 3) Pin
Luc Pattyn22-Sep-10 13:06
sitebuilderLuc Pattyn22-Sep-10 13:06 
QuestionDataBinding-aware (dependency)objects? Pin
Don Rolando19-Sep-10 3:32
Don Rolando19-Sep-10 3:32 
Questionpicturebox.visible problem Pin
bimbambumbum18-Sep-10 15:36
bimbambumbum18-Sep-10 15:36 
AnswerRe: picturebox.visible problem Pin
bimbambumbum18-Sep-10 15:42
bimbambumbum18-Sep-10 15:42 
GeneralRe: picturebox.visible problem Pin
DaveyM6918-Sep-10 20:29
professionalDaveyM6918-Sep-10 20:29 
AnswerRe: picturebox.visible problem Pin
Luc Pattyn19-Sep-10 3:44
sitebuilderLuc Pattyn19-Sep-10 3:44 
QuestionChoice of .NET Framework version Pin
fdsfsa76f7sa615-Sep-10 21:31
fdsfsa76f7sa615-Sep-10 21:31 
AnswerRe: Choice of .NET Framework version Pin
Kubajzz16-Sep-10 0:16
Kubajzz16-Sep-10 0:16 
AnswerRe: Choice of .NET Framework version Pin
Pete O'Hanlon16-Sep-10 1:28
mvePete O'Hanlon16-Sep-10 1:28 
AnswerRe: Choice of .NET Framework version Pin
The Man from U.N.C.L.E.20-Sep-10 12:06
The Man from U.N.C.L.E.20-Sep-10 12:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.