circleProgress->SetCenterPosition(235, 235);
circleProgress->SetRadius(215);
circleProgress->SetStartAngle(215);
- circleProgress->SetEndAngle(505 + 100);
+ circleProgress->SetEndAngle(505);
circleProgress->SetCapType(CAP_ROUND);
circleProgress->SetValue(100);
void UICircleProgress::GetAngleRange(int16_t& start, int16_t& end) const
{
GetStartEndAngle(start, end);
-#if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
- HwGetAngleRange(start, end);
-#else
DrawArc::GetInstance()->GetDrawRange(start, end);
-#endif
}
void UICircleProgress::GetRedrawAngle(int16_t& start, int16_t& end) const
} else {
end = angle + start;
}
-#if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
- HwGetAngleRange(start, end);
-#else
DrawArc::GetInstance()->GetDrawRange(start, end);
-#endif
}
#if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
void UICircleProgress::DrawForegroundGradient(BufferInfo& gfxDstBuffer, const Rect& invalidatedArea,
const Point& point, const uint16_t& radius, const Vector2<float>& angle)
{
ArcInfo arcInfo = {point, {0, 0}, radius, angle.x_, angle.y_, nullptr};
+ while (FloatLess(arcInfo.endAngle, arcInfo.startAngle)) {
+ arcInfo.endAngle += CIRCLE_IN_DEGREE;
+ }
arcInfo.radius -= foregroundStyle_->lineWidth_ / 2; // 2: half
LiteMGfxEngine::GetInstance()->SyncHwDraw();