ScatterDraw: PieDraw paint transparent background

git-svn-id: svn://ultimatepp.org/upp/trunk@11646 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2017-12-31 17:03:18 +00:00
parent 41ec7d1ad9
commit 1478117013
2 changed files with 9 additions and 4 deletions

View file

@ -19,7 +19,7 @@ static void DrawPie(Draw& w, double c_x, double c_y, double r, int start, int al
double dxy = (x-ix)*(x-ix) + (y-iy)*(y-iy);
if(dxy < 0.1 || i == 0 || i == n)
vP << Point(ix,iy);
if(w.IsGui() && !IsNull(background))
if(w.IsGui())
w.DrawRect(ix, iy, 1, 1, Blend(fill, background, 150));
}
vP << centre;
@ -80,8 +80,7 @@ Color PieDraw::GetCatColor(const int& index) const {
void PieDraw::PaintPie(Draw& w, int scale) {
Size sz = scale*GetSize();
if (!IsNull(backColor))
w.DrawRect(sz, backColor);
w.DrawRect(sz, backColor);
Size textsize;
textsize.cx = 0;

View file

@ -15,7 +15,13 @@ public:
enum titlePosition {BOTTOM, TOP};
PieDraw& SetColor(const Color& _color) {backColor = _color; return *this;}
PieDraw& SetColor(const Color& _color) {backColor = _color;
RGBA r;
r = backColor;
r.a = 0;
backColor = r;
return *this;}
PieDraw& SetTitle(const String& _title) {title = _title; return *this;}
String GetTitle() {return title;}
PieDraw& SetTitleFont(const Upp::Font& font){titleFont = font; return *this;}