| Scatter Control [message #6350] |
Wed, 08 November 2006 09:29  |
andrei-catalin
Messages: 62 Registered: May 2006 Location: Romania
|
Member |
|
|
Hi!
Below you can see my first attempt to make a simple control for plotting data and functions. Certainly, many improvements are possible and any suggestion is welcome.
To test it unzip Scatter.zip in MyApps folder and open TestScatter package. I tested it in Windows, 610-dev3.
Andrei
[Updated on: Sat, 23 December 2006 19:45] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Scatter v0.2 [message #6527 is a reply to message #6488] |
Thu, 16 November 2006 14:01   |
andrei-catalin
Messages: 62 Registered: May 2006 Location: Romania
|
Member |
|
|
Scatter v0.2 features:
-Unlimited number of data series or functions
-Performance improved using AddPick method
-Better appearance and interface in Layout Designer
-Added support for reporting and printing
-Labels for X-Y axis
-More options
-...
Andrei
[Updated on: Sat, 23 December 2006 19:46] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Scatter v0.3 [message #6874 is a reply to message #6855] |
Sat, 02 December 2006 17:42   |
 |
mirek
Messages: 14290 Registered: November 2005
|
Ultimate Member |
|
|
| masu wrote on Fri, 01 December 2006 09:29 | BTW, I had to also delete your library defintions for the Scatter package.
The required libraries should already be included by the used packages (CtrlCore etc.).
Matthias
|
Very nice. I feel happy that number of capable U++ programmers seems to grow quickly now 
Comments:
Maybe instead of XY, I would use Pointf (in fact, even
typedef Pointf XY;
would work here 
Capitalisation of plotFunction and some of other methods seems inconsistent with both rest of class and U++...
Using Win32 API is generally OK, but causes cross-platform problems. I think it should be possible to implement DrawPie and DrawRoundRect using existing primitives (second one is primitive, DrawPie is somewhat harder, but hey, you are drawing cubic splines there, so you can do it 
Mirek
|
|
|
|
|
|
|
|
| Re: Scatter v0.3 [message #6885 is a reply to message #6877] |
Sun, 03 December 2006 13:34   |
 |
mirek
Messages: 14290 Registered: November 2005
|
Ultimate Member |
|
|
| Quote: |
| Quote: | Capitalisation of plotFunction and some of other methods seems inconsistent with both rest of class and U++...
|
Necessary, but I don't read too well your hint. Could you give me a piece of advice?
|
If there is no special reason, I would use "PlotFunction"
| Quote: |
| Quote: | Print preview is off, most likely wrongly placed (see the right edge)
|
Only on screen; on paper (or PDF) is OK.
|
Yes, but should be OK even on the screen.
Mirek
[Updated on: Sun, 03 December 2006 13:34] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Scatter-new version [message #9177 is a reply to message #9172] |
Thu, 19 April 2007 23:35   |
guido
Messages: 169 Registered: April 2006
|
Experienced Member |
|
|
| ebojd wrote on Thu, 19 April 2007 22:12 | Thanks Andrei,
I get a number of errors starting with:
Scatter.cpp:546 WinMetaFileDraw not declared in scope... It looks like it includes the appropriate files. Any quick ideas on what to look into?
I'm currently running the final release of 2007.1 with gcc-4.1.1 on gentoo linux.
EBo --
ps: I would love to cut and paste the error messages from upp, but for some reason the text is not being coppied to the publicly accessible clipboard.
|
EMF is a win32 thing not yet supported elsewhere.
I have attached a version with WIN32 platform conditionals.
Except IsMetaFile() checks, which I just removed out of laziness.
Also gcc4 didn't like mixing enum with bool (BOTTOM, TOP), so I hacked it up with #define.
I investigated EMF support for Unixes. But it is tricky as already existing libs, like libwmf and libemf, make use of Wine headers, inheriting the LGPL license that way.
PS:
Forgot to explain: I allowed myself to change "BUTTOM" to "BOTTOM"
Guido
[Updated on: Thu, 19 April 2007 23:38] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Scatter-new version [message #11734 is a reply to message #11681] |
Mon, 24 September 2007 06:01   |
andrei-catalin
Messages: 62 Registered: May 2006 Location: Romania
|
Member |
|
|
To simplify your task you must use the current version of Scatter.
Scatter v0.6 features:
4 new methods (tested in "Operations" tab):
void RemoveAllSeries();
void RemoveAllFSeries();
const Vector<String> & GetPLegend() const {return vLegend;}
const Vector<String> & GetFLegend() const {return vFLegend;}
Added PopUpInfo class to show the coordinates outside of plotting area
3 new tests: Dynamic, Log and Operations
Added conditional compilation directives for WinMetafile
Andrei
[Updated on: Tue, 25 September 2007 07:22] Report message to a moderator
|
|
|
|
| Re: Scatter-new version [message #11739 is a reply to message #11734] |
Mon, 24 September 2007 16:14   |
 |
forlano
Messages: 1221 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
| andrei-catalin wrote on Mon, 24 September 2007 06:01 | To simplify your task you must use the current version of Scatter.
Scatter v0.6 features:
4 new methods (tested in "Operations" tab):
void RemoveAllSeries();
void RemoveAllFSeries();
const Vector<String> & GetPLegend() const {return vLegend;}
const Vector<String> & GetFLegend() const {return vFLegend;}
Added PopUpInfo class to show the coordinates outside of plotting area
3 new tests: Dynamic, Log and Operations
Added conditional compilation directives for WinMetafile
Andrei
|
Thanks Andrei, this control is becoming better and better.
I've compiled the example using mingw of latest dev version and got some error that I removed as reported:
1. in Scatter.cpp
popText.SetColor(::Color(200,220,255));
instead of:
popText.SetColor(class::Color(200,220,255));
2. in Pie.h
static void DrawPie(Draw& w, Point centre, int r, int start, int alpha, int width=0, class::Color fill=Null, class::Color outline=Black,uint64 pattern=0,class::Color background=White);
(just added 'static' to remove the mismatch of declaration)
3. in testScatter2.h
scatter7.PlotFunction(f1,String("funct")+AsString(topIndex));
...
scatter7.AddSeries(s,String("series")+AsString(topIndex),true);
instead of
scatter7.PlotFunction(f1,String("funct")<<topIndex);
...
scatter7.AddSeries(s,String("series")<<topIndex,true);
Luigi
[Updated on: Mon, 24 September 2007 16:16] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|