Anti-aliasing for the rounded volume meter

This commit is contained in:
Jean Pierre Cimalando 2021-04-27 14:23:14 +02:00
parent b07699efdd
commit 8b38a7633b

View file

@ -1034,11 +1034,11 @@ void SLevelMeter::draw(CDrawContext* dc)
fillColor.alpha = static_cast<uint8_t>(A * 255.0); fillColor.alpha = static_cast<uint8_t>(A * 255.0);
} }
dc->setDrawMode(kAliasing);
CCoord radius = radius_; CCoord radius = radius_;
bool isRounded = radius > 0.0; bool isRounded = radius > 0.0;
dc->setDrawMode(isRounded ? kAntiAliasing : kAliasing);
SharedPointer<CGraphicsPath> largeRoundRect; SharedPointer<CGraphicsPath> largeRoundRect;
SharedPointer<CGraphicsPath> fillRoundRect; SharedPointer<CGraphicsPath> fillRoundRect;