diff --git a/uppsrc/ScatterDraw/PieDraw.cpp b/uppsrc/ScatterDraw/PieDraw.cpp index 1e548ca23..393f950ba 100644 --- a/uppsrc/ScatterDraw/PieDraw.cpp +++ b/uppsrc/ScatterDraw/PieDraw.cpp @@ -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; diff --git a/uppsrc/ScatterDraw/PieDraw.h b/uppsrc/ScatterDraw/PieDraw.h index 20866aaa1..ee926b95c 100644 --- a/uppsrc/ScatterDraw/PieDraw.h +++ b/uppsrc/ScatterDraw/PieDraw.h @@ -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;}