From 8255e398182db3e25b9edf00d560f7273193bef2 Mon Sep 17 00:00:00 2001 From: koldo Date: Tue, 2 Jan 2018 22:17:46 +0000 Subject: [PATCH] *PieDraw: Fixed problem with transparent background git-svn-id: svn://ultimatepp.org/upp/trunk@11655 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ScatterDraw/PieDraw.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uppsrc/ScatterDraw/PieDraw.cpp b/uppsrc/ScatterDraw/PieDraw.cpp index 393f950ba..13439fea2 100644 --- a/uppsrc/ScatterDraw/PieDraw.cpp +++ b/uppsrc/ScatterDraw/PieDraw.cpp @@ -80,7 +80,8 @@ Color PieDraw::GetCatColor(const int& index) const { void PieDraw::PaintPie(Draw& w, int scale) { Size sz = scale*GetSize(); - w.DrawRect(sz, backColor); + if (!IsNull(backColor)) + w.DrawRect(sz, backColor); Size textsize; textsize.cx = 0; @@ -202,6 +203,8 @@ Image PieDraw::GetImage(int scale) { bp.LineCap(LINECAP_BUTT); bp.LineJoin(LINEJOIN_MITER); + if(IsNull(backColor)) + bp.Clear(RGBAZero()); PaintPie(bp, scale); return ib;