Scatter: Fixed DrawLegend(). Added GetLabelsFont()

git-svn-id: svn://ultimatepp.org/upp/trunk@2271 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2010-03-26 19:58:22 +00:00
parent 36cbf9dcef
commit 3e65e13acb
2 changed files with 6 additions and 2 deletions

View file

@ -154,6 +154,8 @@ void Scatter::DrawLegend(Draw& w,const int& scale) const
LC.Append(vFColors);
Vector<int> LW;
LW.Append(vPWidth);
Vector<bool>VJ;
VJ.Append(vJoin);
Vector<int> MS;
MS.Append(vMarkStyles);
Vector<class::Color> MC;
@ -186,7 +188,8 @@ void Scatter::DrawLegend(Draw& w,const int& scale) const
LC.At(i));*/
Vector <Point> vp;
vp << Point(scale*(i-start)*legendWeight, scale*(4-12*(j+1))) << Point(scale*(i-start)*legendWeight+scale*23, scale*(4-12*(j+1)));
DrawPolylineX(w, vp, scale*Thick.At(i)/6, LC.At(i), Patt.At(i), scale);
if (VJ.At(i))
DrawPolylineX(w, vp, scale*Thick.At(i)/6, LC.At(i), Patt.At(i), scale);
Point p(scale*((i-start)*legendWeight+7),scale*(4-12*(j+1))+scale*Thick.At(i)/12);
DrawMark(MS.At(i),w,scale,p,LW.At(i,0),MC.At(i));
Font scaledFont;
@ -819,7 +822,7 @@ void Scatter::SaveToClipboard()
WinMetaFileDraw wmfd;
wmfd.Create(6*GetSize().cx,6*GetSize().cy,"Scatter","chart");
SetDrawing (wmfd, 6);
WinMetaFile wmf = wmfd.Close();
WinMetaFile wmf = wmfd.Close();
wmf.WriteClipboard();
}
#else

View file

@ -62,6 +62,7 @@ public:
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);