Scatter: Deprecated.

git-svn-id: svn://ultimatepp.org/upp/trunk@10064 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2016-07-18 12:12:43 +00:00
parent 91a2feead6
commit 17309bc7d8
16 changed files with 0 additions and 8751 deletions

View file

@ -1,79 +0,0 @@
PREMULTIPLIED
IMAGE_ID(cursor1)
IMAGE_ID(ZoomMinus)
IMAGE_ID(ZoomPlus)
IMAGE_ID(ShapeHandles)
IMAGE_ID(Copy)
IMAGE_ID(RightArrow)
IMAGE_ID(LeftArrow)
IMAGE_ID(Save)
IMAGE_ID(DownArrow)
IMAGE_ID(UpArrow)
IMAGE_BEGIN_DATA
IMAGE_DATA(120,156,237,152,105,80,84,87,22,199,65,203,15,58,85,153,153,170,169,154,76,149,21,199,169,73,149,83,154,137,32,90)
IMAGE_DATA(137,226,135,153,170,201,135,36,53,101,88,148,48,33,70,54,25,150,132,61,2,134,96,16,4,23,68,16,162,128,128,128)
IMAGE_DATA(236,8,130,128,2,162,194,19,69,209,184,97,177,67,55,251,46,107,3,13,252,231,220,215,116,79,55,208,208,77,71,101)
IMAGE_DATA(38,156,230,95,77,223,62,191,115,206,189,239,222,251,238,107,173,183,181,222,214,250,21,189,126,105,6,254,111,37,254,74)
IMAGE_DATA(252,149,248,75,97,127,78,189,238,250,87,226,175,196,95,137,255,102,227,47,75,251,13,189,230,177,245,164,50,45,201,128)
IMAGE_DATA(72,85,54,211,190,152,25,51,255,176,176,176,66,249,198,153,207,44,142,209,2,236,250,249,216,121,98,40,171,163,76,25)
IMAGE_DATA(59,43,70,153,146,175,37,19,192,40,21,74,37,239,167,140,215,242,129,114,169,192,27,83,30,101,90,152,87,181,255,119)
IMAGE_DATA(148,124,173,233,248,51,51,154,47,134,148,61,190,113,35,78,235,232,64,123,225,24,243,205,63,86,243,122,31,250,159,241)
IMAGE_DATA(42,196,152,215,180,255,79,99,56,111,222,44,84,151,151,198,176,212,210,18,218,188,245,150,112,121,111,6,252,226,243,145)
IMAGE_DATA(45,2,181,55,131,89,188,92,12,213,55,3,198,191,169,205,64,62,255,82,54,3,229,253,87,109,51,80,127,252,121,74)
IMAGE_DATA(107,101,51,120,237,49,94,229,102,176,100,243,240,240,16,6,4,4,192,201,201,233,197,98,190,123,246,236,185,105,109,109)
IMAGE_DATA(13,3,3,3,153,111,96,96,32,158,61,123,134,163,71,143,226,100,78,27,142,103,183,34,144,228,159,73,186,220,10,191)
IMAGE_DATA(244,102,248,166,53,195,39,165,25,230,230,230,224,56,14,38,38,38,178,201,110,103,103,247,208,215,215,23,199,78,133,227)
IMAGE_DATA(18,215,141,132,146,110,196,147,226,110,117,33,246,102,23,98,138,187,16,93,212,129,168,194,14,216,58,123,195,208,208,16)
IMAGE_DATA(250,250,250,156,124,93,44,223,165,82,41,215,141,139,196,197,50,238,70,39,46,16,23,89,208,129,243,215,218,241,99,94)
IMAGE_DATA(27,220,46,52,204,89,152,172,214,184,219,51,57,165,92,209,127,185,115,196,133,231,182,225,108,78,43,28,35,234,230,240)
IMAGE_DATA(172,143,210,90,25,23,69,92,196,245,14,156,203,39,142,216,179,87,91,17,154,211,130,51,87,90,96,31,94,51,135,63)
IMAGE_DATA(146,218,76,125,236,228,251,200,56,105,173,97,87,89,206,22,132,16,23,156,217,140,211,151,155,97,27,82,61,135,255,62)
IMAGE_DATA(81,160,208,71,105,173,140,59,147,217,194,115,167,50,154,113,34,77,8,235,160,170,57,188,87,156,64,82,107,174,164,214)
IMAGE_DATA(144,108,73,173,167,51,37,220,201,116,33,142,167,10,16,152,34,128,249,201,23,115,248,111,99,26,168,86,73,31,165,181)
IMAGE_DATA(6,177,156,196,157,152,225,142,37,53,193,63,177,17,251,3,43,231,240,46,145,245,138,181,166,179,90,37,92,64,178,0)
IMAGE_DATA(254,196,250,93,106,196,209,248,70,152,249,63,87,224,119,238,220,41,220,189,123,55,62,250,196,80,214,71,86,43,227,142)
IMAGE_DATA(73,185,132,70,248,198,55,96,243,182,191,99,221,186,117,88,179,102,205,11,57,30,249,249,249,216,186,85,7,214,193,85)
IMAGE_DATA(176,164,241,97,125,60,64,117,178,90,205,252,43,241,47,191,231,48,37,173,93,187,22,137,137,137,88,189,122,181,172,134)
IMAGE_DATA(77,155,54,61,220,178,101,203,244,134,13,27,238,206,238,215,108,91,181,106,85,161,182,182,54,99,185,197,124,85,50,249)
IMAGE_DATA(205,224,15,127,222,97,96,243,67,124,145,217,247,41,156,153,119,18,103,118,56,145,51,245,136,231,76,14,93,228,246,185)
IMAGE_DATA(199,112,123,221,162,57,99,151,40,206,208,41,130,51,117,10,46,98,254,242,177,172,124,147,75,28,131,178,57,85,101,228)
IMAGE_DATA(16,90,34,207,127,233,147,194,169,163,127,218,134,42,12,130,153,119,50,167,142,125,122,240,140,34,255,93,34,223,94,124)
IMAGE_DATA(251,54,23,28,157,87,31,148,85,59,233,153,88,7,207,132,26,120,196,85,193,45,250,57,92,46,60,133,115,196,79,112)
IMAGE_DATA(60,255,8,223,132,63,128,253,217,114,184,134,22,14,111,124,255,35,59,54,94,204,110,17,239,159,65,19,146,22,162,170)
IMAGE_DATA(250,58,232,230,148,169,87,60,207,223,46,41,225,188,146,234,160,142,172,79,220,130,201,161,88,9,95,90,202,121,38,212)
IMAGE_DATA(66,29,179,56,118,3,198,174,81,60,95,66,242,136,175,230,219,199,196,147,16,141,139,49,44,18,227,229,200,56,122,135)
IMAGE_DATA(68,232,234,31,69,123,247,8,90,186,134,208,208,62,200,251,125,229,87,0,67,199,243,178,177,101,227,197,108,98,114,18)
IMAGE_DATA(227,20,99,116,66,18,99,96,84,140,190,225,49,116,15,82,156,151,34,116,244,140,242,126,95,30,201,199,95,62,220,251)
IMAGE_DATA(195,30,135,112,238,83,155,16,206,61,182,146,111,23,79,77,97,130,52,78,113,70,88,29,99,98,12,81,156,193,17,49)
IMAGE_DATA(250,135,38,208,51,56,198,251,125,225,157,171,176,168,93,162,158,240,237,147,211,211,188,164,113,198,88,44,177,24,34,170)
IMAGE_DATA(135,175,137,226,49,51,241,204,82,224,191,249,177,130,111,159,146,139,49,49,19,67,42,17,213,52,42,150,240,70,110,233)
IMAGE_DATA(10,188,125,200,61,181,198,255,51,231,20,5,126,251,39,142,41,54,65,165,176,12,40,198,1,191,66,236,247,189,14,211)
IMAGE_DATA(195,217,48,241,186,130,125,30,151,177,215,61,131,114,166,193,208,37,5,159,57,165,128,249,171,177,236,231,183,95,211,235)
IMAGE_DATA(53,152,38,63,198,72,143,137,75,98,125,124,124,150,202,35,190,72,188,24,15,101,98,236,34,188,204,103,33,41,225,85)
IMAGE_DATA(98,149,240,26,229,213,160,191,202,108,169,28,207,106,114,125,151,200,73,217,87,99,203,124,65,46,121,176,53,185,192,108)
IMAGE_DATA(130,168,201,202,56,57,86,153,148,114,11,105,22,171,50,167,164,47,75,205,171,105,127,231,240,11,248,44,100,154,44,68)
IMAGE_DATA(173,69,106,83,149,127,53,38,127,92,254,253,251,6,78,239,232,219,6,111,54,14,175,208,181,200,236,211,179,185,54,177)
IMAGE_DATA(221,182,96,122,135,93,33,118,216,74,244,161,125,17,118,125,125,3,59,29,10,161,103,153,217,175,243,121,216,131,223,254)
IMAGE_DATA(105,23,255,227,216,31,255,230,28,249,164,105,20,79,154,68,116,204,154,134,136,52,58,62,69,199,172,73,58,26,77,160)
IMAGE_DATA(119,80,204,127,22,77,76,161,123,64,140,134,14,209,116,65,69,135,120,159,119,65,207,239,54,253,195,226,61,211,152,170)
IMAGE_DATA(39,141,163,240,73,237,164,163,12,177,228,103,121,242,30,250,134,196,232,34,255,193,209,73,62,238,0,189,11,123,198,81)
IMAGE_DATA(219,62,134,130,199,125,184,241,184,7,250,246,185,99,186,150,89,47,31,19,239,157,220,193,251,48,49,190,115,96,130,142)
IMAGE_DATA(104,98,62,47,203,223,65,181,212,119,140,161,182,77,4,207,120,1,74,43,251,161,103,147,55,205,250,91,81,63,66,124)
IMAGE_DATA(59,239,195,100,125,170,28,157,244,62,52,70,71,45,170,169,127,120,18,141,157,44,183,8,213,173,34,28,138,107,66,74)
IMAGE_DATA(73,59,182,219,228,129,141,85,121,221,48,190,75,106,135,128,234,99,106,238,29,167,220,147,124,238,33,209,20,90,123,39)
IMAGE_DATA(100,108,85,235,40,190,141,109,64,66,113,11,244,14,94,5,27,231,187,213,196,39,182,241,117,91,81,238,131,65,229,176)
IMAGE_DATA(15,121,0,7,210,191,131,239,195,138,218,45,229,228,26,85,131,152,2,1,244,172,115,248,235,115,167,106,16,94,9,205)
IMAGE_DATA(212,47,18,189,123,37,8,225,21,207,36,160,35,191,128,242,53,194,157,158,77,93,163,235,225,28,85,11,215,11,117,136)
IMAGE_DATA(200,173,135,158,213,21,158,47,169,28,148,176,36,9,39,228,99,48,246,208,197,38,190,94,183,232,6,158,115,137,172,33)
IMAGE_DATA(85,35,44,171,6,219,44,51,121,190,248,233,75,98,133,51,18,200,114,243,44,229,117,143,169,231,89,103,226,156,206,87)
IMAGE_DATA(209,99,199,11,4,165,85,98,155,69,6,241,5,40,124,220,15,207,56,33,127,157,85,145,67,248,51,28,79,122,10,93)
IMAGE_DATA(243,52,124,64,227,119,237,81,63,95,171,136,174,85,192,45,243,5,197,230,130,109,232,79,244,12,253,8,186,7,82,241)
IMAGE_DATA(129,125,33,242,42,250,40,191,132,47,169,187,185,160,24,111,19,252,16,71,162,43,136,79,166,250,175,79,231,220,239,37)
IMAGE_DATA(190,73,229,252,86,167,238,227,112,100,57,182,238,79,156,254,235,23,113,13,25,101,221,200,184,211,165,114,255,15,71,220)
IMAGE_DATA(131,199,185,187,120,239,243,200,222,119,118,217,156,126,247,99,223,92,29,243,180,190,237,54,249,52,39,115,249,121,165,103)
IMAGE_DATA(157,141,109,86,89,116,141,46,67,215,34,157,198,42,149,234,77,129,206,87,201,146,188,166,81,3,239,126,124,132,123,213)
IMAGE_DATA(119,103,85,119,235,121,89,21,238,18,191,84,86,233,113,117,129,187,165,2,191,216,221,121,177,199,4,101,188,138,119,205)
IMAGE_DATA(57,188,154,119,91,25,255,6,142,217,90,26,112,139,219,114,63,46,107,122,236,93,234,133,214,116,130,105,58,177,213,125)
IMAGE_DATA(142,84,115,65,42,196,250,31,216,128,150,13,59,143,126,86,251,15,116,241,146,1,0,0,0,0,0,0,0,0,0,0)
IMAGE_END_DATA(2080, 10)

View file

@ -1,132 +0,0 @@
ctrl Scatter {
group "Extra";
GetMinSize() {sz.cx=150; sz.cy = 100; return sz; }
GetStdSize() {sz.cx=300; sz.cy = 200; return sz; }
Frame SetFrame @20;
Color SetColor =:White @1;
Text SetTitle @5;
Font SetTitleFont @6;
Color SetTitleColor =:Black @7;
int H_Border =30 @2;
int V_Border =30 @3;
Color SetPlotAreaColor =:WhiteGray @4;
Text SetLabelX @8;
Text SetLabelY @9;
Font SetLabelsFont @10;
Color SetLabelsColor=:Black @11;
Color SetAxisColor =:Black @12;
int SetAxisWidth =6 @13;
Color SetGridColor=:Color(102,102,102);
int SetGridWidth=-4;
bool ShowHGrid=true;
bool ShowVGrid=true;
bool ShowLegend=true;
int SetLegendWeight=80;
bool SetFastViewX=false;
bool SetSequentialXAll=false;
Paint(w) {
r = GetRect();
w.DrawRect(r, .SetColor);
DrawCtrlFrame(w, r, .SetFrame);
sz = GetSize();
textsize = GetTextSize(.SetTitle, .SetTitleFont);
if(.SetTitle=="") textsize.cy=0;
HB=0;
if(.H_Border>0) HB=.H_Border;
VB=0;
if(.V_Border>0) VB=.V_Border;
w.DrawRect(HB-1,VB-1+textsize.cy,-2*HB+2+sz.cx,-2*VB+2-textsize.cy+sz.cy,:Gray);
aw=6;
if(.SetAxisWidth >= 6) aw=.SetAxisWidth;
w.DrawRect(HB-int(aw/6),
VB+textsize.cy,
-2*HB+int(aw/6)+sz.cx,
-2*VB+int(aw/6)-textsize.cy+sz.cy,
.SetAxisColor);
w.DrawRect(HB,VB+textsize.cy,-2*HB+sz.cx,-2*VB-textsize.cy+sz.cy,.SetPlotAreaColor);
w.DrawText((sz.cx - textsize.cx) / 2, 4, .SetTitle, .SetTitleFont, .SetTitleColor);
lx=GetTextSize(.SetLabelX,.SetLabelsFont);
ly=GetTextSize(.SetLabelY,.SetLabelsFont);
w.DrawText(int((sz.cx-lx.cx)/2),sz.cy -(ly.cy+2),.SetLabelX,.SetLabelsFont,.SetLabelsColor);
w.DrawText(2,int((sz.cy+textsize.cy+ly.cx)/2),900,.SetLabelY,.SetLabelsFont,.SetLabelsColor);
}
};
ctrl Plot2D {
> Scatter;
};
enum_property titlePosition {
"0" : "BOTTOM",
"1" : "TOP"
};
ctrl PieChart {
group "Extra";
GetMinSize() {sz.cx=50; sz.cy = 50; return sz; }
GetStdSize() {sz.cx=200; sz.cy = 200; return sz; }
Frame SetFrame @20;
Color SetColor =:White @1;
Text SetTitle @5;
Font SetTitleFont =StdFont(16)@6;
Color SetTitleColor =:Black @7;
titlePosition TitlePos = 1;
int SetTitleGap=2;
int SetRadius=60;
bool ShowPercent=true;
Color SetPercentBack=Null;
Font SetLegendFont;
Color SetLegendTextColor=:Black;
Color SetLegendBackColor=Null;
int SetLegend_cx=60;
int SetLegend_cy=120;
bool SetShowLegend=true;
Paint(w) {
r = GetRect();
w.DrawRect(r, .SetColor);
DrawCtrlFrame(w, r, .SetFrame);
sz = GetSize();
textsize = GetTextSize(.SetTitle, .SetTitleFont);
Gap=0;
if(.SetTitleGap>0) Gap=.SetTitleGap;
if(.TitlePos=="1") w.DrawText((sz.cx - textsize.cx) / 2, Gap, .SetTitle, .SetTitleFont, .SetTitleColor);
else w.DrawText((sz.cx - textsize.cx) / 2, sz.cy-textsize.cy-Gap, .SetTitle, .SetTitleFont, .SetTitleColor);
if(.SetTitle=="") textsize.cy=0;
radius=0;
if(.SetRadius>0) radius=.SetRadius;
lcx=0;
lcy=0;
numitor=2;
legendBk=.SetColor;
if(.SetLegendBackColor!=Null) legendBk=.SetLegendBackColor;
if(.SetLegend_cx>0 && .SetShowLegend) {lcx=.SetLegend_cx; numitor=3;}
if(.SetLegend_cy>0 && .SetShowLegend) lcy=.SetLegend_cy;
if(.TitlePos=="1")
{
w.DrawRect((sz.cx-2*radius-lcx)/numitor, (sz.cy+Gap+textsize.cy-2*radius)/2, 2*radius,2*radius,:Gray);
w.DrawRect((sz.cx-2*radius-lcx)/numitor+2, (sz.cy+Gap+textsize.cy-2*radius)/2+2, 2*radius-4,2*radius-4,:White);
w.DrawRect(2*(sz.cx+radius-lcx)/3, (sz.cy+Gap+textsize.cy-lcy)/2, lcx,lcy,:Gray);
w.DrawRect(2*(sz.cx+radius-lcx)/3+2, (sz.cy+Gap+textsize.cy-lcy)/2+2, lcx-4,lcy-4,legendBk);
if(.SetShowLegend)
w.DrawText(2*(sz.cx+radius-lcx)/3+2, (sz.cy+Gap+textsize.cy-lcy)/2+2,"LEGEND",.SetLegendFont, .SetLegendTextColor);
}
else
{
w.DrawRect((sz.cx-2*radius-lcx)/numitor, (sz.cy-Gap-textsize.cy-2*radius)/2, 2*radius,2*radius,:Gray);
w.DrawRect((sz.cx-2*radius-lcx)/numitor+2, (sz.cy-Gap-textsize.cy-2*radius)/2+2, 2*radius-4,2*radius-4,:White);
w.DrawRect(2*(sz.cx+radius-lcx)/3, (sz.cy-Gap-textsize.cy-lcy)/2, lcx,lcy,:Gray);
w.DrawRect(2*(sz.cx+radius-lcx)/3+2, (sz.cy-Gap-textsize.cy-lcy)/2+2, lcx-4,lcy-4,legendBk);
if(.SetShowLegend)
w.DrawText(2*(sz.cx+radius-lcx)/3+2, (sz.cy-Gap-textsize.cy-lcy)/2+2,"LEGEND",.SetLegendFont, .SetLegendTextColor);
}
}
};

View file

@ -1,365 +0,0 @@
#include "Pie.h"
static void DrawPie(Draw& w, Point centre, int r, int start, int alpha, int width, class::Color fill, class::Color outline,uint64 pattern,class::Color background )
{
const int dalpha=1;
int n= alpha/dalpha;
Vector <Point> vP;
vP<<centre;
int ix;
int iy;
for (int i=0; i<=n; i++)
{
double x=centre.x+ r*cos((start+i*dalpha)*M_PI/1800);
ix=fround(x);
double y=centre.y+r*sin((start+i*dalpha)*M_PI/1800);
iy=fround(y);
double dxy=(x-ix)*(x-ix)+(y-iy)*(y-iy);
if(dxy<0.1 || i ==0 || i==n)
vP<<Point(ix,iy);
//if(!(dynamic_cast<const DrawingDraw *>(&w)) && !w.IsPrinter()) w.DrawRect(ix,iy,1,1,Blend(fill,background,150));
if(w.IsGui()) w.DrawRect(ix,iy,1,1,Blend(fill,background,150));
}
vP<<centre;
w.DrawPolygon(vP,fill,width,outline,pattern,Null);
}
static void DrawScaledPie(Draw& w, Point centre, int r, int start, int alpha, int width=0, class::Color fill=Null, class::Color outline=Black, int scale=1,uint64 pattern=0,class::Color background=White)
{
DrawPie(w, centre, scale*r, start, alpha, scale*width, fill, outline,pattern,background);
}
static void DrawMLText(Draw& w, const Rect& box, String content, const Font& f, class::Color textColor=Black)
{
int L=box.Width();
int H=box.Height();
int count=0;
Size sz;
content.Cat(' ');
while(!content.IsEmpty())
{
int pos=0;//current position
int lastpos=0;
int toDraw=0;
while(toDraw<L && pos>=0)
{
lastpos=pos+1;
pos=content.Find(' ',lastpos);
sz= GetTextSize(content.Left(pos+1), f);
toDraw=sz.cx;
}
if (pos<0)
{
sz= GetTextSize(content, f);
toDraw=sz.cx;
if(toDraw<L) lastpos=content.GetCount();
}
w.DrawText(box.left, box.top+count*fround(f.GetHeight()*1.2),content.Left(lastpos), f,textColor);
sz=GetTextSize(content.Mid(lastpos,pos-lastpos), f);
if(sz.cx>=L) return;
count++;
content=content.Mid(lastpos);
}
}
PieChart& PieChart::SetColor(const class::Color& _color)
{
backColor=_color;
return *this;
}
PieChart& PieChart::SetTitle(const String& _title)
{
title=_title;
return *this;
}
PieChart& PieChart::SetTitleFont(const Font& fontTitle)
{
titleFont=fontTitle;
return *this;
}
PieChart& PieChart::SetTitleColor(const class::Color& colorTitle)
{
titleColor=colorTitle;
return *this;
}
PieChart& PieChart::TitlePos(titlePosition pos)
{
titlePos=pos;
return *this;
}
PieChart& PieChart::SetTitleGap(const int& gap)
{
titleGap=gap;
return *this;
}
PieChart& PieChart::SetRadius(const int& r)
{
radius=r;
return *this;
}
PieChart& PieChart::ShowPercent(bool show)
{
showPercent=show;
return *this;
}
PieChart& PieChart::SetPercentBack(const class::Color& pbcolor)
{
percentBack=pbcolor;
return *this;
}
PieChart& PieChart::SetLegendFont(const Font& fontLegend)
{
legendFont=fontLegend;
return *this;
}
PieChart& PieChart::SetLegendTextColor(const class::Color& colorLegend)
{
legendTextColor=colorLegend;
return *this;
}
PieChart& PieChart::SetLegendBackColor(const class::Color& colorBack)
{
legendBackColor=colorBack;
return *this;
}
PieChart& PieChart::SetLegend_cx(const int& h)
{
legend_cx=h;
return *this;
}
PieChart& PieChart::SetLegend_cy(const int& v)
{
legend_cy=v;
return *this;
}
PieChart& PieChart::SetShowLegend(bool show)
{
showLegend=show;
return *this;
}
void PieChart::AddCategory(const String& name, const double& value, const class::Color& catcolor)
{
vNames.Add(name);
vValues.Add(value);
vColors.Add(catcolor);
Refresh();
}
void PieChart::RemoveCategory(const int& index)
{
if(!vValues.IsEmpty() && vValues.GetCount()>index)
{
vNames.Remove(index);
vValues.Remove(index);
vColors.Remove(index);
Refresh();
}
}
PieChart& PieChart::SetCatValue(const int& index, const double& value)
{
if(!vValues.IsEmpty() && vValues.GetCount()>index)
{
vValues[index]=value;
Refresh();
}
return *this;
}
PieChart& PieChart::SetCatName(const int& index, const String& name)
{
if(!vNames.IsEmpty() && vNames.GetCount()> index)
{
vNames[index]=name;
Refresh();
}
return *this;
}
PieChart& PieChart::SetCatColor(const int& index, const class::Color& catcolor)
{
if(!vColors.IsEmpty() && vColors.GetCount()> index)
{
vColors[index]=catcolor;
Refresh();
}
return *this;
}
double PieChart::GetCatValue(const int& index) const
{
if(!vValues.IsEmpty() && vValues.GetCount()>index)
{
return vValues[index];
}
else return -1;
}
String PieChart::GetCatName(const int& index) const
{
if(!vNames.IsEmpty() && vNames.GetCount()> index)
{
return vNames[index];
}
else return "";
}
Acolor PieChart::GetCatColor(const int& index) const
{
if(!vColors.IsEmpty() && vColors.GetCount()> index)
{
return vColors[index];
}
else return Null;
}
int PieChart::GetCatCount() const
{
return vColors.GetCount();
}
void PieChart::PaintPie(Draw& w, int scale)
{
if(vValues.GetCount()>0)
{
double sum=0;
int alfa0=-900;
int a0=0;
for(int i=0;i<vValues.GetCount(); i++)
{
sum+=vValues[i];
}
int cx,cy;
if(showLegend) cx=scale*(GetSize().cx+radius-legend_cx)/3;
else cx=(scale*GetSize().cx)/2;
if(titlePos==BOTTOM)
cy=scale*(GetSize().cy-titleGap-titleFont.GetHeight())/2;
else
cy=scale*(GetSize().cy+titleGap+titleFont.GetHeight())/2;
Acolor bc;
if (backColor==(Acolor)Null ) bc=LtGray;
else bc=backColor;
for(int i=0;i<vValues.GetCount(); i++)
{
DrawScaledPie(w,Point(cx,cy),
radius, alfa0, fround(3600.0*vValues.At(i)/sum),1,vColors.At(i),vColors.At(i),scale,0,bc);
alfa0+=fround(3600.0*vValues[i]/sum);
}
if(showPercent)
{
alfa0=-900;
for(int i=0;i<vValues.GetCount(); i++)
{
a0=alfa0;
alfa0+=fround(3600.0*vValues[i]/sum);
String percent=GetPercent(vValues[i],sum);
Font scaledFont;
scaledFont.Height(scale*StdFont().GetHeight());
scaledFont.Width(scale*StdFont().GetWidth());
Size sz= GetTextSize(percent, scaledFont);
int px=cx+int(scale*radius*cos(3.14*(alfa0+a0)/3600)/1.3)-sz.cx/2;
int py=cy+int(scale*radius*sin(3.14*(alfa0+a0)/3600)/1.3)-sz.cy/2;
w.DrawRect(px+1-1,py,sz.cx-2+2,1,percentBack);
w.DrawRect(px-1,py+1,sz.cx+2,sz.cy-2,percentBack);
w.DrawRect(px+1-1,py+sz.cy-1,sz.cx-2+2,1,percentBack);
w.DrawText(px, py, percent,scaledFont);
}
}
if(showLegend)
{
int lx=2*scale*(GetSize().cx+radius-legend_cx)/3;
int ly=cy-scale*legend_cy/2;
w.DrawRect(lx,ly,scale*legend_cx,scale*legend_cy,legendBackColor);
int nr=GetCatCount();
int dly=scale*legend_cy/nr;
for(int i=0;i<nr;i++)
{
int fh=scale*(legendFont.GetHeight()-3);
w.DrawRect(lx+2*scale,ly+scale*3+i*dly,fh,fh,vColors[i]);
Rect box;
box.Set(Point(lx+fround(1.8*fh),ly+i*dly),Point(lx+scale*legend_cx,ly+(i+1)*dly));
Font scaledFont;
scaledFont.Height(scale*legendFont.GetHeight());
scaledFont.Width(scale*legendFont.GetWidth());
::DrawMLText(w, box,vNames[i],scaledFont,legendTextColor);
}
}
}
}
void PieChart::DrawChart(Draw& w, int scale)
{
Size pcsz = GetSize();
w.DrawRect(scale*pcsz,backColor);
Size sz;
sz.cx=0;
sz.cy=0;
if(!title.IsEmpty())
{
Font FontTitle6;
FontTitle6=titleFont;
FontTitle6.Height(scale*titleFont.GetHeight());
FontTitle6.Width(scale*titleFont.GetWidth());
sz= GetTextSize(title, FontTitle6);
if(titlePos==TOP) w.DrawText((scale*GetSize().cx-sz.cx)/2,scale*titleGap,title,FontTitle6,titleColor);
else if(titlePos==BOTTOM) w.DrawText((scale*GetSize().cx-sz.cx)/2,scale*(GetSize().cy-titleFont.GetHeight()-titleGap),title,FontTitle6,titleColor);
}
PaintPie(w, scale);
}
void PieChart::Paint(Draw& w)
{
DrawChart(w,1);
}
String PieChart::GetPercent(double a, double total)
{
double p=a*100/total;
String perc=FormatDouble(p,1);
perc<<'%';
return perc;
}
Drawing PieChart::GetDrawing()
{
DrawingDraw ddw(6*GetSize());
DrawChart (ddw, 6);
return ddw;
}
Image PieChart::GetImage(int scale)
{
ImageDraw idraw(scale*GetSize());
DrawChart (idraw,scale);
return idraw;
}
#ifdef PLATFORM_WIN32
void PieChart::SaveAsMetafile(const char* file)
{
WinMetaFileDraw wmfd;
wmfd.Create(6*GetSize().cx,6*GetSize().cy,"Pie","PieChart",file);
DrawChart (wmfd, 6);
wmfd.Close();
}
#endif
PieChart::PieChart():
backColor(White),
titleFont(StdFont(16)),
titlePos(TOP), titleGap(2),titleColor(Black),
radius(60),
showPercent(true),
percentBack(Null),
legendFont(StdFont()),
legendTextColor(Black),legendBackColor(Null),
legend_cx(60), legend_cy(120),
showLegend(true)
{
Transparent();
BackPaint();
}
PieChart::~PieChart(){}

View file

@ -1,90 +0,0 @@
/*
PieChart control
V0.3, Sept. 2007
Copyright (C) 2006-2007, Andrei-Catalin
*/
#ifndef _Scatter_Pie_h_
#define _Scatter_Pie_h_
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
typedef class::Color Acolor;
class PieChart: public Ctrl
{
public:
enum titlePosition {BOTTOM, TOP};
PieChart& SetColor(const class::Color& _color);
PieChart& SetTitle(const String& _title);
PieChart& SetTitleFont(const Font& fontTitle);
PieChart& SetTitleColor(const class::Color& colorTitle);
PieChart& TitlePos(titlePosition pos=TOP);
PieChart& SetTitleGap(const int& gap);
PieChart& SetRadius(const int& r);
PieChart& ShowPercent(bool show=true);
PieChart& SetPercentBack(const class::Color& pbcolor);
PieChart& SetLegendFont(const Font& fontLegend);
PieChart& SetLegendTextColor(const class::Color& colorLegend);
PieChart& SetLegendBackColor(const class::Color& colorBack);
PieChart& SetLegend_cx(const int& h);
PieChart& SetLegend_cy(const int& v);
PieChart& SetShowLegend(bool show);
void AddCategory(const String& name, const double& value, const class::Color& catcolor);
void RemoveCategory(const int& index);
PieChart& SetCatValue(const int& index, const double& value);
PieChart& SetCatName(const int& index, const String& name);
PieChart& SetCatColor(const int& index, const class::Color& catcolor);
double GetCatValue (const int& index)const;
String GetCatName (const int& index)const;
Acolor GetCatColor (const int& index)const;
int GetCatCount() const;
PieChart();
~PieChart();
void Paint(Draw& w);
Drawing GetDrawing();
Image GetImage(int scale=1);
#ifdef PLATFORM_WIN32
void SaveAsMetafile(const char* file);
#endif
private:
class::Color backColor;
String title;
Font titleFont;
class::Color titleColor;
titlePosition titlePos;
int titleGap;
int radius;
bool showPercent;
Acolor percentBack;
Font legendFont;
class::Color legendTextColor, legendBackColor;
int legend_cx, legend_cy;
bool showLegend;
Vector<String> vNames;
Vector<double> vValues;
Vector<class::Color> vColors;
String GetPercent(double a, double total);
void PaintPie(Draw& w,int scale);
void DrawChart(Draw& w,int scale);
};
#endif

View file

@ -1,22 +0,0 @@
#include "PopUpText.h"
void PopUpInfo::Paint(Draw& w)
{
Size sz = GetSize();
if(!IsTransparent())
w.DrawRect(0, 0, sz.cx, sz.cy, color);
PaintLabel(w, 0, 0, sz.cx, sz.cy, !IsShowEnabled(), false, false, VisibleAccessKeys());
}
PopUpInfo::PopUpInfo(): color(SColorInfo())
{
Transparent(false);
NoWantFocus();
IgnoreMouse();
SetAlign(ALIGN_CENTER);
SetFrame(BlackFrame());
opened = false;
}

View file

@ -1,52 +0,0 @@
#ifndef _PopUpText_PopUpText_h
#define _PopUpText_PopUpText_h
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class PopUpInfo : public StaticText {
Color color;
bool opened;
public:
void Paint(Draw& w);
PopUpInfo& SetFont(Font font) { LabelBase::SetFont(font); return *this; }
PopUpInfo& SetInk(Color color) { LabelBase::SetInk(color); return *this; }
PopUpInfo& SetAlign(int align) { LabelBase::SetAlign(align); return *this; }
PopUpInfo& SetImage(const Image& img, int spc = 0) { LabelBase::SetImage(img, spc); return *this; }
PopUpInfo& SetText(const char *text) { LabelBase::SetText(text); return *this; }
PopUpInfo& operator=(const char *s) { SetText(s); return *this; }
PopUpInfo& SetColor(const Color& c) { color=c; return *this; }
PopUpInfo();
inline void Appear(Ctrl *owner, const int& x, const int& y, const int& gx=0, const int& gy=0)
{
AppearOnly(owner);
Move(owner, x, y, gx, gy);
}
inline void AppearOnly(Ctrl *owner)
{
if(IsOpen()) Close();
Ctrl::PopUp(owner);
}
inline void AppearOnlyOpen(Ctrl *owner)
{
if (opened)
return;
AppearOnly(owner);
opened = true;
}
inline void Move(Ctrl *owner, const int& x, const int& y, const int& gx=0, const int& gy=0)
{
SetRect(owner->GetScreenRect().left+x,owner->GetScreenRect().top+y,GetMinSize().cx+8+gx,GetMinSize().cy+4+gy);
}
};
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,393 +0,0 @@
/*
ScatterChart Control
V0.6, Sept. 2007
Copyright (C) 2006-2007, Andrei-Catalin
*/
#ifndef _Scatter_Scatter_h
#define _Scatter_Scatter_h
#include "PopUpText.h"
#include <plugin/jpg/jpg.h>
using namespace Upp;
typedef Pointf XY;
class Scatter : public StaticRect {
public:
enum MarkStyle
{
CIRCLE,
RECTANGLE,
SQUARE,
TRIANGLE,
CROSS,
X,
RHOMB
};
enum Formats
{
EXP,
MON,
DY,
CUSTOM
};
#define LINE_DOTTED "o..."
#define LINE_DOTTED_SEP "o..........."
#define LINE_DASHED "oooooo......"
#define LINE_DASH_DOT "ooooo...o..."
#define LINE_SOLID "oooooooooooo"
Callback3<String&, int, double> cbModifFormatX, cbModifFormatDeltaX;
Callback3<String&, int, double> cbModifFormatY, cbModifFormatDeltaY;
Callback3<String&, int, double> cbModifFormatY2, cbModifFormatDeltaY2;
virtual void Paint(Draw& w);
virtual void LeftDown(Point, dword);
virtual void LeftUp(Point, dword);
virtual void MiddleDown(Point, dword);
virtual void MouseMove(Point, dword);
virtual void MiddleUp(Point, dword);
virtual void RightDown(Point, dword);
virtual void RightUp(Point, dword);
virtual void MouseLeave();
virtual void MouseWheel(Point, int zdelta, dword);
Callback WhenZoomScroll;
Callback WhenSetRange;
Callback WhenSetXYMin;
enum MouseAction {NO_ACTION = 0, SCROLL, ZOOM_H_ENL, ZOOM_H_RED, ZOOM_V_ENL, ZOOM_V_RED, SHOW_INFO, CONTEXT_MENU};
struct MouseBehaviour {
bool ctrl;
bool alt;
bool shift;
bool left;
bool middle;
int middleWheel;
bool right;
MouseAction action;
};
#define MAX_MOUSEBEHAVIOR 20
bool SetMouseBehavior(MouseBehaviour *_mouseBehavior);
Scatter& SetColor(const class::Color& _color);
Scatter& SetTitle(const String& _title);
Scatter& SetTitleFont(const Font& fontTitle);
Scatter& SetTitleColor(const class::Color& colorTitle);
void SetLabels(const WString& _xLabel, const WString& _yLabel, const WString& _yLabel2 = "");
Scatter& SetLabelX(const WString& _xLabel);
Scatter& SetLabelY(const WString& _yLabel);
Scatter& SetLabelY2(const WString& _yLabel);
Scatter& SetLabelsFont(const Font& fontLabels);
Font GetLabelsFont() {return labelsFont;};
Scatter& SetLabelsColor(const class::Color& colorLabels);
Scatter& SetPlotAreaPoz(const int& poz_x,const int& poz_y);
Scatter& H_Border(const int& poz_x);
Scatter& V_Border(const int& poz_y);
Scatter& SetPlotAreaColor(const class::Color& p_a_color);
Scatter& SetAxisColor(const class::Color& axis_color);
Scatter& SetAxisWidth(const int& axis_width);
Scatter& SetGridColor(const class::Color& grid_color);
Scatter& SetGridWidth(const int& grid_width);
Scatter& ShowVGrid(const bool& show);
Scatter& ShowHGrid(const bool& show);
Scatter& ShowLegend(const bool& show=true);
Scatter& SetLegendWeight(const int& weight);
Scatter& ShowContextMenu(const bool& show=true) {showContextMenu = show; return *this;}
Scatter& SetAntialiasing(const bool& aa=true);
void FitToData(bool Y = false);
void Zoom(double scale, bool hor = true, bool ver = true);
void Scroll(double factorX, double factorY);
Scatter& SetRange(double rx, double ry, double ry2 = 100);
double GetXRange()const {return xRange;}
double GetYRange()const {return yRange;}
double GetY2Range()const {return yRange2;}
Scatter& SetMajorUnits(double ux, double uy);
double GetMajorUnitsX() {return xMajorUnit;}
double GetMajorUnitsY() {return yMajorUnit;}
Scatter& SetMinUnits(double ux, double uy);
double GetXMinUnit () const {return xMinUnit;}
double GetYMinUnit () const {return yMinUnit;}
Scatter& SetXYMin(double xmin,double ymin,double ymin2 = 0);
double GetXMin () const {return xMin;}
double GetYMin () const {return yMin;}
double GetYMin2 () const {return yMin2;}
void SetPopText(const String x, const String y1, const String y2) {popTextX = x; popTextY = y1; popTextY2 = y2;}
void Graduation_FormatX(Formats fi);
void Graduation_FormatY(Formats fi);
void Graduation_FormatY2(Formats fi);
Scatter& SetMouseHandling(bool valx = true, bool valy = false);
Scatter &AddSeries(Vector<XY> & points,const String& legend="", const bool& join=false,const class::Color& pcolor=LtBlue,const int& width=30,const int& thickness=6);
Scatter &Stroke(int width = 30, class::Color pcolor = Null, String pattern = Null);
Scatter &Mark(int thickness = 6, class::Color pcolor = Null, MarkStyle style = CIRCLE);
Scatter &HideMark() {vShowMark[vShowMark.GetCount()-1] = false; Refresh(); return *this;}
Scatter &SetPattern(const String pattern);
inline bool IsValid(const int& j) const {return (j>=0 && j<vPointsData.GetCount());}
Scatter& SetDrawXReticle(bool set = true);
Scatter& SetDrawYReticle(bool set = true);
Scatter& SetDrawY2Reticle(bool set = true);
void SetData(const int& nbSeries, const int& index, const XY & point);
void AddPoint(const int& nbSeries, const XY & point,const bool& refresh=true );
void InsertPoint(const int& nbSeries, const int& index,const XY & point);
void RemovePoint(const int& nbSeries, const int& index);
void SetDataColor(const int& j,const class::Color& pcolor);
void SetFunctColor(const int& j, const class::Color& fcolor);
class::Color GetDataColor (const int& j) const;
class::Color GetFunctColor (const int& j) const;
void SetDataThickness(const int& j, const int& thick_dots);
void SetFunctThickness(const int& j,const int& thick_dots);
int GetDataThickness(const int& j) const;
int GetFunctThickness(const int& j) const;
void SetMarkWidth(const int& j, const int& width_dots);
int GetMarkWidth(const int& j) const;
void SetMarkStyle(const int& j, MarkStyle noStyle);
int GetMarkStyle(const int& j) const;
void SetMarkColor(const int& j, const class::Color& pcolor);
::Color GetMarkColor (const int& j) const;
void SetShowMark(const int& j, const bool& show=true);
bool IsMarkShow(const int& j) const throw (Exc);
void SetJoin(const int& j, const bool& join=true);
bool IsJoined(const int& j) const throw (Exc);
void SetSmooth(const int& j, const bool& smooth=true);
bool IsSmooth(const int& j) const throw (Exc);
void SetDataPrimaryY(const int& j, const bool& primary=true);
Scatter &SetDataPrimaryY(const bool& primary);
bool IsDataPrimaryY(const int& j) const throw (Exc);
void SetFunctPrimaryY(const int& j, const bool& primary=true);
Scatter &SetFunctPrimaryY(const bool& primary);
bool IsFunctPrimaryY(const int& j) const throw (Exc);
void SetSequentialX(const int& j, const bool& sequential = true);
Scatter &SetSequentialX(const bool& sequential = true);
Scatter &SetSequentialXAll(const bool& sequential = true);
void RemoveSeries(const int& j);
void RemoveAllSeries();
void SetData(const int& nbSeries, Vector<XY> & points);
const Vector<Vector<XY> > & GetPData() const {return vPointsData;}
const Vector<Vector<XY> > & GetFData() const {return vFunctionData;}
const Vector<String> & GetPLegend() const {return vLegend;}
const Vector<String> & GetFLegend() const {return vFLegend;}
typedef Callback2<double&, double> PlotFunc; //y = f(x)
typedef Callback2<XY&, double> PlotParamFunc;// (x,y) = f(t)
void PlotFunction(PlotFunc, const String& legend="", const class::Color& fcolor=Green,const int& weight=6);
void PlotParaFunction(PlotParamFunc, const String& legend="", const class::Color& fcolor=Green,const int& weight=6,const int& Np=100);
inline static void PlotFuncCB(double& y, double x, double (*f)(double)) { y = f(x); }
void PlotFunction(double (*f)(double),const String& legend="", const class::Color& fcolor=Green,const int& weight=6)
{
PlotFunction(callback1(&PlotFuncCB, f), legend, fcolor, weight);
}
inline static void PlotParamFuncCB(XY& xy, double t, XY (*pf)(double)) { xy = pf(t); }
void PlotParaFunction(XY (*pf)(double),const String& legend="", const class::Color& fcolor=Green,const int& weight=6,const int& Np=100)
{
PlotParaFunction(callback1(&PlotParamFuncCB, pf), legend, fcolor, weight, Np);
}
Scatter &SetFunctPattern(const String pattern);
void RemoveFSeries(const int& j);
void RemoveAllFSeries();
Scatter &ShowInfo(bool show=true);
void ProcessPopUp(const Point & pt);
Drawing GetDrawing()const;
Image GetImage(const int& scale=1);
#ifdef PLATFORM_WIN32
void SaveAsMetafile(const char* file)const;
#endif
void SaveToClipboard(bool saveAsMetafile = false);
void SaveToImage(String fileName = Null);
Scatter& LogX(const bool& logx=true) {logX=logx; return *this;}
Scatter& LogY(const bool& logy=true) {logY=logy; return *this;}
Scatter& LogY2(const bool& logy=true) {logY2=logy; return *this;}
Scatter& SetMinZoom(double x, double y = -1) {minXZoom = x; minYZoom = y; return *this;};
Scatter& SetMaxZoom(double x, double y = -1) {maxXZoom = x; maxYZoom = y; return *this;};
Scatter& SetFastViewX(bool set = true) {fastViewX = set; return *this;};
Font& GetTitleFont() {return titleFont;};
int GetH_Border() {return px;};
int GetV_Border() {return py;};
double GetXByPoint(const int x);
double GetYByPoint(const int y);
double GetY2ByPoint(const int y);
double GetXPointByValue(const double x);
double GetYPointByValue(const double y);
private:
class ::Color graphColor;
String title;
Font titleFont;
class::Color titleColor;
WString xLabel, yLabel, yLabel2;
Font labelsFont;
class::Color labelsColor;
int px, py;
class ::Color plotAreaColor;
bool fastViewX, sequentialXAll;
bool paintInfo;
Point clickPoint;
PopUpInfo popText;
String popTextX, popTextY, popTextY2;
Point popLT, popRB;
const Point offset;
class::Color axisColor;
int axisWidth;
double xRange,yRange,yRange2;
double xMin,yMin,yMin2;
double xMajorUnit,yMajorUnit,yMajorUnit2;
double xMinUnit,yMinUnit, yMinUnit2;
double minXZoom, maxXZoom, minYZoom, maxYZoom;
bool drawXReticle, drawYReticle, drawY2Reticle;
class::Color gridColor;
int gridWidth;
bool drawVGrid, drawHGrid;
bool logX, logY, logY2;
int butDownX, butDownY;
bool isScrolling, isLabelPopUp;
Vector<Vector<XY> > vPointsData,vFunctionData;
Vector<bool> vFPrimaryY, vPPrimaryY;
Vector<bool> /*vFSequential, */vPSequential;
Vector<String> vFPattern, vPPattern;
Vector<PlotFunc> vAdress;
Vector<class::Color> vPColors,vFColors;
Vector<int> vFThickness,vPThickness;
Vector<int> vPWidth;
Vector<bool> vJoin;
Vector<bool> vSmooth;
Vector<class::Color> vMarkColors;
Vector<bool> vShowMark;
Vector<int> vMarkStyles;
Vector<String> vLegend;
Vector<String> vFLegend;
bool showLegend;
int legendWeight;
bool antialiasing;
bool mouseHandlingX, mouseHandlingY;
bool showContextMenu;
Vector<XY> Cubic (const Vector<XY>& DataSet, const int& fineness=10, double tension=0.4)const;
void DrawLegend(Draw& w,const int& scale) const;
MouseBehaviour *mouseBehavior;
void DoMouseAction(bool down, Point pt, MouseAction action, int value);
void ProcessMouse(bool down, Point &pt, bool ctrl, bool alt, bool shift, bool left, bool middle, int middleWheel, bool right);
void LabelPopUp(bool down, Point &pt);
void Scrolling(bool down, Point &pt, bool isOut = false);
void MouseZoom(int zdelta, bool hor, bool ver);
void SetDrawing(Draw& w, const int& scale)const;
void Circle(Draw& w, const int& scale, const Point& cp, const int& size, const class::Color& markColor)const;
void Square(Draw& w, const int& scale, const Point& cp, const int& size, const class::Color& markColor)const;
void Rectangle(Draw& w, const int& scale, const Point& cp, const int& size, const class::Color& markColor)const;
void Triangle(Draw& w, const int& scale, const Point& cp, const int& size, const class::Color& markColor)const;
void Cross(Draw& w, const int& scale, const Point& cp, const int& size, const class::Color& markColor)const;
void XFunct(Draw& w, const int& scale, const Point& cp, const int& size, const class::Color& markColor)const;
void Rhomb(Draw& w, const int& scale, const Point& cp, const int& size, const class::Color& markColor)const;
inline void DrawMark(const int& style, Draw& w, const int& scale, const Point& cp, const int& size, const class::Color& markColor)const;
static void DrawPolylineX(Draw& w, const Vector<Point> &p, int thick, const class::Color &color, String pattern, const int& scale);
static void DrawLineX(Draw& w, const int x0, const int y0, const int x1, const int y1, int thick, const class::Color &color, String pattern, const int &scale);
void AdjustMinUnitX();
void AdjustMinUnitY();
void AdjustMinUnitY2();
void ContextMenu(Bar& bar);
virtual Image CursorImage(Point p, dword keyflags);
void ExpFormat(String& s, int i, double d)
{
s=FormatDoubleExp(d,1);
}
void MonFormat(String& s, int i, double d)
{
s=Format("%Mon",int(d));
}
void DyFormat(String& s, int i, double d)
{
s=Format("%Dy",int(d));
}
static String VariableFormat(double range, double d)
{
if (fabs(d) <= 1e-15)
d = 0;
if (0.001<=range && range<0.01) return FormatDouble(d,5);
else if (0.01<=range && range<0.1) return FormatDouble(d,4);
else if (0.1<=range && range<1) return FormatDouble(d,3);
else if (1<=range && range<10) return FormatDouble(d,2);
else if (10<=range && range<100) return FormatDouble(d,1);
else if (100<=range && range<100000) return FormatDouble(d,0);
else return FormatDoubleExp(d,2);
}
String VariableFormatX(const double& d) const {return VariableFormat(xRange, d);}
String VariableFormatY(const double& d) const {return VariableFormat(yRange, d);}
String VariableFormatY2(const double& d) const {return VariableFormat(yRange2, d);}
void Plot(Draw& w, const int& scale,const int& l,const int& h) const;
public:
typedef Scatter CLASSNAME;
Scatter();
};
typedef Scatter Plot2D;
#endif

View file

@ -1,64 +0,0 @@
#ifdef _MSC_VER
#pragma setlocale("C")
#endif
// Scatter.cpp
T_("Invalid graph range")
caES("")
esES("Rango del gr\303\241fico incorrecto")
T_("Invalid series index!")
caES("\302\241S\303\250rie amb \303\255ndex incorrecte!")
esES("\302\241Serie con \303\255ndice incorrecto!")
T_("Invalid function index!")
caES("\302\241Funci\303\263 amb \303\255ndex incorrecte!")
esES("\302\241Funci\303\263n con \303\255ndice incorrecto!")
T_("Fit to data")
caES("Ajust a les dades")
esES("Ajustar a los datos")
T_("Zoom +")
caES("")
esES("")
T_("Zoom -")
caES("")
esES("")
T_("Scroll Left")
caES("Moure a l'esquerra")
esES("Mover a la izquierda")
T_("Scroll Right")
caES("More a la dreta")
esES("Mover a la derecha")
T_("Scroll Up")
caES("Moure amunt")
esES("Mover arriba")
T_("Scroll Down")
caES("Moure baix")
esES("Mover abajo ")
T_("Copy")
caES("Copiar")
esES("Copiar")
T_("Save to file")
caES("Guardar a fitxer")
esES("Guardar en fichero")
T_("Saving plot to PNG or JPEG file")
caES("Guardant gr\303\240fic en fitxer PNG o JPEG")
esES("Guardando gr\303\241fico en fichero PNG o JPEG")
T_("Plot has not been saved")
caES("El gr\303\240fic no s'ha desat")
esES("El gr\303\241fico no ha sido guardado")
T_("File format %s not found")
caES("Format %s no trobat")
esES("Formato %s no encontrado")

View file

@ -1,19 +0,0 @@
description "Bazaar: Scatter & Pie ctrls, by Andrei-Catalin\377";
uses
CtrlLib,
plugin\jpg;
file
Scatter.cpp,
Scatter.h,
Scatter.t,
PopUpText.cpp,
PopUpText.h,
Chart.usc,
Pie.cpp,
Pie.h,
Chart.iml,
srcdoc.tpp,
src.tpp;

View file

@ -1,58 +0,0 @@
ctrl Scatter {
group "Extra";
GetMinSize() {sz.cx=150; sz.cy = 100; return sz; }
GetStdSize() {sz.cx=300; sz.cy = 200; return sz; }
Frame SetFrame @20;
Color SetColor =:White @1;
Text SetTitle @5;
Font SetFontTitle @6;
Color SetColorTitle =:Black @7;
int H_Border =30 @2;
int V_Border =30 @3;
Color SetPlotAreaColor =:WhiteGray @4;
Text SetLabelX @8;
Text SetLabelY @9;
Font SetFontLabels @10;
Color SetColorLabels=:Black @11;
Color SetAxisColor =:Black @12;
int SetAxisWidth =6 @13;
Color SetGridColor=:Color(102,102,102);
int SetGridWidth=-4;
bool ShowHGrid=true;
bool ShowVGrid=true;
bool showLegend=true;
int SetLegendWeight=80;
Paint(w) {
r = GetRect();
w.DrawRect(r, .SetColor);
DrawCtrlFrame(w, r, .SetFrame);
sz = GetSize();
textsize = GetTextSize(.SetTitle, .SetFontTitle);
if(.SetTitle=="") textsize.cy=0;
HB=0;
if(.H_Border>0) HB=.H_Border;
VB=0;
if(.V_Border>0) VB=.V_Border;
w.DrawRect(HB-1,VB-1+textsize.cy,-2*HB+2+sz.cx,-2*VB+2-textsize.cy+sz.cy,:Gray);
aw=6;
if(.SetAxisWidth >= 6) aw=.SetAxisWidth;
w.DrawRect(HB-int(aw/6),
VB+textsize.cy,
-2*HB+int(aw/6)+sz.cx,
-2*VB+int(aw/6)-textsize.cy+sz.cy,
.SetAxisColor);
w.DrawRect(HB,VB+textsize.cy,-2*HB+sz.cx,-2*VB-textsize.cy+sz.cy,.SetPlotAreaColor);
w.DrawText((sz.cx - textsize.cx) / 2, 4, .SetTitle, .SetFontTitle, .SetColorTitle);
lx=GetTextSize(.SetLabelX,.SetFontLabels);
ly=GetTextSize(.SetLabelY,.SetFontLabels);
w.DrawText(int((sz.cx-lx.cx)/2),sz.cy -(ly.cy+2),.SetLabelX,.SetFontLabels,.SetColorLabels);
w.DrawText(2,int((sz.cy+textsize.cy+ly.cx)/2),900,.SetLabelY,.SetFontLabels,.SetColorLabels);
}
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 B

View file

@ -1,5 +0,0 @@
#ifndef _Scatter_icpp_init_stub
#define _Scatter_icpp_init_stub
#include "CtrlLib/init"
#include "plugin\jpg/init"
#endif

View file

@ -1,437 +0,0 @@
topic "Scatter Reference";
[2 $$0,0#00000000000000000000000000000000:Default]
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
[l288;2 $$2,2#27521748481378242620020725143825:desc]
[0 $$3,0#96390100711032703541132217272105:end]
[H6;0 $$4,0#05600065144404261032431302351956:begin]
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
[b42;2 $$9,9#13035079074754324216151401829390:normal]
[{_}
[ {{10000@(113.42.0) [s0;%% [*@7;4 Scatter]]}}&]
[s3; &]
[s1;:Scatter`:`:class: [@(0.0.255)3 class][3 _][*3 Scatter][3 _:_][@(0.0.255)3 public][3 _][*@3;3 St
aticRect]&]
[s9; A class to plot 2D graphs.&]
[s0;i448;a25;kKO9;@(0.0.255) &]
[ {{10000F(128)G(128)@1 [s0;%% [* Function List]]}}&]
[s4; &]
[s5;:Scatter`:`:class: [@(0.0.255) void]_[* FitToData]([@(0.0.255) bool]_[*@3 Y]_`=_[@(0.0.255) f
alse])&]
[s0;l288;%% Changes X axis zoom to fit visible all data in Ctrl.&]
[s0;l288;i448;a25;kKO9;%% If [%-*@3 Y ]is true, Y axis zoom is also
changed to fit the data.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:SaveToClipboard`(bool`): [@(0.0.255) void]_[* SaveToClipboard]([@(0.0.255) b
ool]_[*@3 saveAsMetafile]_`=_[@(0.0.255) false])&]
[s2;%% Saves graph to clipboard as a bitmap.&]
[s2;%% In windows if [%-*@3 saveAsMetafile ]is true, a metafile is
sent to clipboard.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:SaveToImage`(String`): [@(0.0.255) void]_[* SaveToImage]([_^String^ String]_
[*@3 fileName]_`=_Null)&]
[s2;%% Saves graph to file [%-*@3 fileName.] Supported formats are
.PNG and .JPG.&]
[s2;%% If [%-*@3 fileName] is null, a window is opened asking the user
to enter a file name.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:SetFastViewX`(bool`): [_^Scatter^ Scatter][@(0.0.255) `&]_[* SetFastViewX](
[@(0.0.255) bool]_[*@3 set]_`=_[@(0.0.255) true])&]
[s2;%% If [%-*@3 set ]is true, it will be viewed a point per horizontal
pixel. This point will be the average of all data that is in
that pixel.&]
[s2;%% This speeds up the graph painting.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:GetTitleFont`(`): [_^Font^ Font][@(0.0.255) `&]_[* GetTitleFont]()&]
[s2;%% Returns title font.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:GetXByPoint`(const int`): [@(0.0.255) double]_[* GetXByPoint]([@(0.0.255) c
onst]_[@(0.0.255) int]_[*@3 x])&]
[s2;%% Gets the X coordinate in data units from value [%-*@3 x ]in
screen pixels inside Ctrl.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:GetYByPoint`(const int`): [@(0.0.255) double]_[* GetYByPoint]([@(0.0.255) c
onst]_[@(0.0.255) int]_[*@3 y])&]
[s2;%% Gets the Y coordinate in data units from value [%-*@3 y ]in
screen pixels inside Ctrl.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:GetY2ByPoint`(const int`): [@(0.0.255) double]_[* GetY2ByPoint]([@(0.0.255) c
onst]_[@(0.0.255) int]_[*@3 y])&]
[s2;%% Gets the Y2 coordinate in data units from value [%-*@3 y ]in
screen pixels inside Ctrl.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:GetXPointByValue`(const double`): [@(0.0.255) double]_[* GetXPointByValue
]([@(0.0.255) const]_[@(0.0.255) double]_[*@3 x])&]
[s2;%% Gets the horizontal position in pixels inside Ctrl for a
value [%-*@3 x ]in data units.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:GetYPointByValue`(const double`): [@(0.0.255) double]_[* GetYPointByValue
]([@(0.0.255) const]_[@(0.0.255) double]_[*@3 y])&]
[s2;%% Gets the vertical position in pixels inside Ctrl for a value
[%-*@3 y ]in data units.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:ShowInfo`(bool`): [_^Scatter^ Scatter][@(0.0.255) `&]_[* ShowInfo]([@(0.0.255) b
ool]_[*@3 show][@(0.0.255) `=true])&]
[s2;%% Defines to show or not with [%-*@3 show ]the pop`-up window
that indicates in data units the cursor location and, if dragged,
the size of the window.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:ShowContextMenu`(const bool`&`): [_^Scatter^ Scatter][@(0.0.255) `&]_[* Sho
wContextMenu]([@(0.0.255) const]_[@(0.0.255) bool`&]_[*@3 show][@(0.0.255) `=true])&]
[s2;%% Defines to show or not with [%-*@3 show ]the context menu with
options to save the plot to clipboard or file. Formats supported
are .PNG and .JPG &]
[s2;%% &]
[s2;%%
@@image:875&375
<EFBFBD><EFBFBD>ō<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>Σ<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>使<EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>
<EFBFBD>輿<EFBFBD>絿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>ǔ<EFBFBD><EFBFBD>箿<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>ō<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>и
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>鴿<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>ǹи<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>蹿<EFBFBD><EFBFBD>便<EFBFBD><EFBFBD><EFBFBD>
&]
[s2;%% &]
[s2;%% If SetMouseHandling() is true in X and/or Y axis, scroll and
zoom are also included.&]
[s2;%% &]
[s2;%%
@@image:881&1237
<EFBFBD><EFBFBD>ο<EFBFBD>
<EFBFBD>Щ<EFBFBD><EFBFBD><EFBFBD>Е<EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>ā<EFBFBD><EFBFBD>×<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>潿<EFBFBD><EFBFBD>á
<EFBFBD>ζ<EFBFBD><EFBFBD><EFBFBD>
γ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>У
<EFBFBD>访<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
耀<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>ρ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>ō<EFBFBD><EFBFBD>
ò<EFBFBD><EFBFBD>ъ
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Г<EFBFBD><EFBFBD>
Β<EFBFBD><EFBFBD>м
ù<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>Γê<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>é<EFBFBD>
稿<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
υ<EFBFBD>ъ<EFBFBD>¨<EFBFBD>
<EFBFBD><EFBFBD>х<EFBFBD>鷿
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>Β
<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>ǖ<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>Β<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ы
<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>ЛЖ<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>β<EFBFBD><EFBFBD>Ш
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>彿<EFBFBD><EFBFBD>ζ<EFBFBD>
<EFBFBD><EFBFBD>娿<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>穿<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>
仿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>簿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ˉ<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>ǎ<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>π
<EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>
&]
[s2;%% &]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:FitToData`(bool`): [@(0.0.255) void]_[* FitToData]([@(0.0.255) bool]_[*@3 Y]_
`=_[@(0.0.255) false])&]
[s2;%% Scales and scrolls the plots so that all data is included
in X axis. If [%-*@3 Y] is true, Y axis is also fitted so that
all plot points are visible.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:Zoom`(double`,bool`,bool`): [@(0.0.255) void]_[* Zoom]([@(0.0.255) double]_
[*@3 scale], [@(0.0.255) bool]_[*@3 hor]_`=_[@(0.0.255) true], [@(0.0.255) bool]_[*@3 ver]_`=
_[@(0.0.255) true])&]
[s2;%% Zooms graph by [%-*@3 scale] factor. The axis scaled are X if
[%-*@3 hor] is true and Y if [%-*@3 ver ]is true.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:Scroll`(double`,double`): [@(0.0.255) void]_[* Scroll]([@(0.0.255) double]_
[*@3 factorX], [@(0.0.255) double]_[*@3 factorY])&]
[s2;%% Scrolls graph by [%-*@3 factorX] in X axis and [%-*@3 factorY
]in Y axis.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:SetMouseHandling`(bool`,bool`): [_^Scatter^ Scatter][@(0.0.255) `&]_[* SetM
ouseHandling]([@(0.0.255) bool]_[*@3 valx]_`=_[@(0.0.255) true], [@(0.0.255) bool]_[*@3 val
y]_`=_[@(0.0.255) false])&]
[s2;%% Activates plot scrolling and zoom in X axis if [%-*@3 valx]
is true and in Y axis if [%-*@3 valy ]is true.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:SetRange`(double`,double`,double`): [_^Scatter^ Scatter][@(0.0.255) `&]_[* S
etRange]([@(0.0.255) double]_[*@3 rx], [@(0.0.255) double]_[*@3 ry],
[@(0.0.255) double]_[*@3 ry2]_`=_`-[@3 1])&]
[s2;%% Sets visible data range for X axis in [%-*@3 rx], Y axis in
[%-*@3 ry] and secondary Y axis in [%-*@3 ry2].&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:GetXRange`(`)const: [@(0.0.255) double]_[* GetXRange]()[@(0.0.255) const]&]
[s2;%% Gets X axis visible data range.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:GetYRange`(`)const: [@(0.0.255) double]_[* GetYRange]()[@(0.0.255) const]&]
[s2;%% Gets Y axis visible data range.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:GetY2Range`(`)const: [@(0.0.255) double]_[* GetY2Range]()[@(0.0.255) const]&]
[s2;%% Gets secondary Y axis visible data range.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:SetMajorUnits`(double`,double`): [_^Scatter^ Scatter][@(0.0.255) `&]_[* Set
MajorUnits]([@(0.0.255) double]_[*@3 ux], [@(0.0.255) double]_[*@3 uy])&]
[s2;%% Sets the space between grid lines, horizontal grid in [%-*@3 ux
]and vertical grid in [%-*@3 uy].&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:GetMajorUnitsX`(`): [@(0.0.255) double]_[* GetMajorUnitsX]()&]
[s2;%% Gets the space between horizontal grid lines.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:GetMajorUnitsY`(`): [@(0.0.255) double]_[* GetMajorUnitsY]()&]
[s2;%% Gets the space between vertical grid lines.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:SetMinUnits`(double`,double`): [_^Scatter^ Scatter][@(0.0.255) `&]_[* SetMi
nUnits]([@(0.0.255) double]_[*@3 ux], [@(0.0.255) double]_[*@3 uy])&]
[s2;%% Sets the distance from the leftmost vertical grid to origin
([%-*@3 ux]) and from bottommost horizontal grid to origin ([%-*@3 uy]).&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:SetXYMin`(double`,double`,double`): [_^Scatter^ Scatter][@(0.0.255) `&]_[* S
etXYMin]([@(0.0.255) double]_[*@3 xmin],[@(0.0.255) double]_[*@3 ymin],[@(0.0.255) double]_
[*@3 ymin2]_`=_[@3 0])&]
[s2;%% Sets the coordinate of the first visible point in the leftmost,
bottommost corner of control in X axis coordinates as [%-*@3 xmin],
Y axis coordinates as [%-*@3 ymin] and secondary Y axis coordinates
as [%-*@3 ymin2].&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:GetXMin`(`)const: [@(0.0.255) double]_[* GetXMin]_()_[@(0.0.255) const]&]
[s2;%% Gets X axis coordinate of the first visible point in the leftmost
side of control.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:GetYMin`(`)const: [@(0.0.255) double]_[* GetYMin]_()_[@(0.0.255) const]&]
[s2;%% Gets Y axis coordinate of the first visible point in the bottommost
side of control.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:GetYMin2`(`)const: [@(0.0.255) double]_[* GetYMin2]_()_[@(0.0.255) const]&]
[s2;%% Gets secondary Y axis coordinate of the first visible point
in the bottommost side of control.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:SetPopText`(const String`,const String`,const String`): [@(0.0.255) voi
d]_[* SetPopText]([@(0.0.255) const]_[_^String^ String]_[*@3 x], [@(0.0.255) const]_[_^String^ S
tring]_[*@3 y], [@(0.0.255) const]_[_^String^ String]_[*@3 y2])&]
[s2;%% Sets the text that will define the values in axis [%-*@3 x],
[%-*@3 y] and [%-*@3 y2].&]
[s2;%% It is used in the pop text that appears when selecting a point
or a window.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:AddSeries`(Vector`<XY`>`&`,const String`&`,const bool`&`,const Color`&`,const int`&`,const int`&`): [_^Scatter^ S
catter]_`&[* AddSeries]([_^Vector^ Vector]<[_^XY^ XY]>_`&_[*@3 points],[@(0.0.255) const]_[_^String^ S
tring][@(0.0.255) `&]_[*@3 legend][@(0.0.255) `=]`"`", [@(0.0.255) const]_[@(0.0.255) bool`&
]_[*@3 join][@(0.0.255) `=false],[@(0.0.255) const]_class`::Color[@(0.0.255) `&]_[*@3 pcolor
][@(0.0.255) `=]LtBlue,[@(0.0.255) const]_[@(0.0.255) int`&]_[*@3 width][@(0.0.255) `=][@3 30
],[@(0.0.255) const]_[@(0.0.255) int`&]_[*@3 thickness][@(0.0.255) `=][@3 6])&]
[s2;%% Adds a new data series located in [%-*@3 points], with [%-*@3 legend].&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:Stroke`(int`,Color`,const String`): [_^Scatter^ Scatter]_`&[* Stroke]([@(0.0.255) i
nt]_[*@3 width]_`=_[@3 30], class`::Color_[*@3 color]_`=_Null, [@(0.0.255) const]_[_^String^ S
tring]_[*@3 pattern]_`=_LINE`_SOLID)&]
[s2;%% Sets the line [%-*@3 width], [%-*@3 color] and line [%-*@3 pattern]
of the latest added series.&]
[s2;%% If [%-*@3 color] is Null, it is selected automatically a different
color depending of the series id.&]
[s2;%% Available [%-*@3 pattern] values are:&]
[s2;i150;O0;%% LINE`_DOTTED -|-|[C `"o...`"]&]
[s2;i150;O0;%% LINE`_DOTTED`_SEP-|[C `"o...........`"]&]
[s2;i150;O0;%% LINE`_DASHED -|-|[C `"oooooo......`"]&]
[s2;i150;O0;%% LINE`_DASH`_DOT -|-|[C `"ooooo...o...`"]&]
[s2;i150;O0;%% LINE`_SOLID -|-|[C `"oooooooooooo`"]&]
[s2;%% However this value is user configurable just entering a String
with the pattern defining line elements as `"o`" and space elements
as `".`".&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:Mark`(int`,Color`,MarkStyle`): [_^Scatter^ Scatter]_`&[* Mark]([@(0.0.255) i
nt]_[*@3 thickness]_`=_[@3 6], class`::Color_[*@3 color]_`=_Null, MarkStyle_[*@3 style]_`=
_CIRCLE)&]
[s2;%% Sets the mark [%-*@3 thickness], [%-*@3 color] and [%-*@3 style]
of the latest added series.&]
[s2;%% If [%-*@3 color] is Null, it is selected automatically a different
color depending of the series id.&]
[s2;%% Available mark [%-*@3 style] values are CIRCLE, RECTANGLE, SQUARE,
TRIANGLE, CROSS, X, RHOMB.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:HideMark`(`): [_^Scatter^ Scatter]_`&[* HideMark]()&]
[s2;%% Hides the of the latest added series.marks.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:SetSequentialX`(const int`&`,const bool`&`): [@(0.0.255) void]_[* SetSequ
entialX]([@(0.0.255) const]_[@(0.0.255) int`&]_[*@3 j], [@(0.0.255) const]_[@(0.0.255) bool
`&]_[*@3 sequential]_`=_[@(0.0.255) true])&]
[s2;%% If [%-*@3 sequential] is true, it Indicates that the [%-*@3 j]
graph data has been sequentially inserted following X axis.&]
[s2;%% This speeds up the graph painting.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:SetSequentialX`(const bool`&`): [_^Scatter^ Scatter]_`&[* SetSequentialX](
[@(0.0.255) const]_[@(0.0.255) bool`&]_[*@3 sequential]_`=_[@(0.0.255) true])&]
[s2;%% If [%-*@3 sequential] is true, it Indicates that the last inserted
graph data has been sequentially inserted following X axis.&]
[s2;%% This speeds up the graph painting.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:SetSequentialXAll`(const bool`&`): [_^Scatter^ Scatter]_`&[* SetSequentia
lXAll]([@(0.0.255) const]_[@(0.0.255) bool`&]_[*@3 sequential]_`=_[@(0.0.255) true])&]
[s2;%% If [%-*@3 sequential] is true, it Indicates that all graph data
has been sequentially inserted following X axis.&]
[s2;%% This speeds up the graph painting.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:RemoveSeries`(const int`&`): [@(0.0.255) void]_[* RemoveSeries]([@(0.0.255) c
onst]_[@(0.0.255) int`&]_[*@3 j])&]
[s2;%% Remove [%-*@3 j] data series.&]
[s3;%% &]
[s4; &]
[s5;:Scatter`:`:RemoveAllSeries`(`): [@(0.0.255) void]_[* RemoveAllSeries]()&]
[s2;%% Remove all data series, cleaning the graph.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:SetMouseBehavior`(Scatter`:`:MouseBehaviour`*`): [@(0.0.255) bool]_[* Set
MouseBehavior]([_^Scatter`:`:MouseBehaviour^ MouseBehaviour]_`*[*@3 mouseBehavior])&]
[s2;%% Sets with [%-*@3 mouseBehavior] the array of MouseBehavior conditions
and actions to be considered when handling the mouse over the
control.&]
[s2;%% This array has to be ended with an item with action `=`= NO`_ACTION.&]
[s2;%% Returns false if [%-*@3 mouseBehavior] array is not well defined.&]
[s3; &]
[s0; &]
[ {{10000@3 [s0;%% [*@(229)4 Scatter`::MouseBehavior]]}}&]
[s3;%% &]
[s1;:Scatter`:`:MouseBehaviour`:`:struct: [@(0.0.255)3 struct][3 _][*3 MouseBehavior]&]
[s9;%% This structure is used to describe the behavior of the mouse
when used in Scatter. It includes the keyboard and mouse conditions
that, when complied, will launch the indicated action.&]
[s9;%% It is used by SetMouseBehavior(MouseBehaviour `*`_mouseBehavior)
function to set an array of MouseBehavior items that will be
used to launch actions as zooming or scrolling when mouse is
used.&]
[s9;%% The default array is in Scatter`::MouseBehaviour defaultMouse.&]
[s3;%% &]
[s0; &]
[ {{10000F(128)G(128)@1 [s0;%% [* Public Member List]]}}&]
[s4;%% &]
[s5;:Scatter`:`:MouseBehaviour`:`:ctrl: [@(0.0.255) bool]_[* ctrl]&]
[s2;%% Set to true if Ctrl has to be pressed.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:MouseBehaviour`:`:alt: [@(0.0.255) bool]_[* alt]&]
[s2;%% Set to true if Alt has to be pressed.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:MouseBehaviour`:`:shift: [@(0.0.255) bool]_[* shift]&]
[s2;%% Set to true if Shift has to be pressed.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:MouseBehaviour`:`:left: [@(0.0.255) bool]_[* left]&]
[s2;%% Set to true if mouse left button has to be pressed.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:MouseBehaviour`:`:middle: [@(0.0.255) bool]_[* middle]&]
[s2;%% Set to true if mouse middle button has to be pressed.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:MouseBehaviour`:`:middleWheel: [@(0.0.255) int]_[* middleWheel]&]
[s2;%% Set to true if mouse middle wheel has to be rolled.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:MouseBehaviour`:`:right: [@(0.0.255) bool]_[* right]&]
[s2;%% Set to true if mouse right button has to be pressed.&]
[s3; &]
[s4; &]
[s5;:Scatter`:`:MouseBehaviour`:`:action: MouseAction_[* action]&]
[s2;%% Is the action to be launched if the previous conditions are
complied. It can be:&]
[s2;i150;O0;~~~1248;%% NO`_ACTION-|No action. It serves to mark the
end of MouseBehavior array.&]
[s2;i150;O0;~~~1248;%% SCROLL-|Scrolls the graphs.&]
[s2;i150;O0;~~~1248;%% ZOOM`_H`_ENL-|Zooms horizontally enlarging
the graphs. &]
[s2;i150;O0;~~~1248;%% ZOOM`_H`_RED-|Zooms horizontally reducing the
graphs.&]
[s2;i150;O0;~~~1248;%% ZOOM`_V`_ENL-|Zooms vertically enlarging the
graphs.&]
[s2;i150;O0;~~~1248;%% ZOOM`_V`_RED-|Zooms horizontally reducing the
graphs.&]
[s2;i150;O0;~~~1248;%% SHOW`_INFO-|Shows an info label including mouse
real X and Y coordinates.&]
[s3;%% &]
[s0; ]

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff