RE: plot curve range
Brought to you by:
rathmann
From: Chad B. <boh...@go...> - 2008-11-26 17:25:38
|
Gianni, I think you want to derive the QwtPlotCurve class, and overload the principle draw(painter,...) call. In there you get the maps that describe the visible area, and you can call the draw(painter, from,to) yourself. Additionally, if you need to break up the drawing, you can have your derived class send itself QEvents, which is effectively a form of pumping messages, but it scales to as many graphs as you want to have draw at the same time. When you handle your events, the draw(from,to) call will get a painter for you. I found that about 2000 points per QEvent looks pretty good on a modern machine. chad -----Original Message----- From: Gianni Ambrosio [mailto:gia...@vi...] Sent: Wednesday, November 26, 2008 5:10 AM To: List for both Qwt users and developers Subject: Re: plot curve range Uwe Rathmann ha scritto: > With QwtPlotCurve::draw(..., from to) you can paint parts of a curve, but this > has no effect on what is painted by QwtPlot::replot(). > In fact, I implemented this way forcing a replot() but I understand there could be a better way. > I guess what you want to do is to derive from QwtData. > I deviced from QwtData but could you please tell me how should I implement it in a class derived from QwtData? I mean where could I skip data plotting? Maybe adding a from/to local variable of the derived class and reimplement x(size_t) and y(size_t)? But what should I return for indexes outside the from/to range? Regards Gianni -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qwt-interest mailing list qwt...@li... https://lists.sourceforge.net/lists/listinfo/qwt-interest |