From 526b96aabd66543ae026f35df612371c820618d7 Mon Sep 17 00:00:00 2001 From: swx1094762 Date: Mon, 20 Feb 2023 11:39:39 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20d8d39ef=20from=20https://gitee.com/shi-?= =?UTF-8?q?qichang/graphic=5Fui/pulls/896=20Description:uicircleprogress?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E8=BF=9B=E5=BA=A6=E6=9D=A1=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=BF=9B=E5=BA=A6=20issuesno:#I6G9GR=20Sig:SIG=5FAppl?= =?UTF-8?q?icationFramework=20Feature=20or=20Bugfix:Feature=20Binary=20Sou?= =?UTF-8?q?rce:NO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: swx1094762 --- frameworks/components/ui_circle_progress.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frameworks/components/ui_circle_progress.cpp b/frameworks/components/ui_circle_progress.cpp index 13335e5..a46f74d 100644 --- a/frameworks/components/ui_circle_progress.cpp +++ b/frameworks/components/ui_circle_progress.cpp @@ -107,14 +107,16 @@ void UICircleProgress::DrawCommonCircle(BufferInfo& gfxDstBuffer, const Rect& in backgroundStyle_->lineCap_); } - if ((startAngle != endAngle) && (foregroundStyle_->lineCap_ == CapType::CAP_ROUND)) { + if ((startAngle != endAngle) || (foregroundStyle_->lineCap_ == CapType::CAP_ROUND)) { arcinfo.imgPos.x = progressImagePos_.x + rect.GetLeft(); arcinfo.imgPos.y = progressImagePos_.y + rect.GetTop(); arcinfo.startAngle = startAngle; arcinfo.endAngle = endAngle; arcinfo.imgSrc = foregroundImage_; - BaseGfxEngine::GetInstance()->DrawArc(gfxDstBuffer, arcinfo, invalidatedArea, *foregroundStyle_, opaScale_, - foregroundStyle_->lineCap_); + if (startAngle != endAngle) { + BaseGfxEngine::GetInstance()->DrawArc(gfxDstBuffer, arcinfo, invalidatedArea, *foregroundStyle_, opaScale_, + foregroundStyle_->lineCap_); + } } } -- GitLab