提交 8ea61c84 编写于 作者: S shiqichang

Description:The UIChart control does not render the background when the...

Description:The UIChart control does not render the background when the reverse drawn curve turns, resulting in black lines on the screen
issuesno:https://gitee.com/openharmony/graphic_ui/issues/I5X9E9
Feature or Bugfix: Feature
Binary Source:No
Signed-off-by: Nshiqichang <shiqichang@huawei.com>
上级 1e8e7096
......@@ -678,12 +678,21 @@ bool UIChartPolyline::GetLineCrossPoint(const Point& p1,
}
}
}
if ((MATH_MIN(p1.x, p2.x) <= MATH_MAX(p3.x, p4.x)) && (MATH_MIN(p3.x, p4.x) <= MATH_MAX(p1.x, p2.x)) &&
(MATH_MIN(p1.y, p2.y) >= MATH_MAX(p3.y, p4.y)) && (MATH_MIN(p3.y, p4.y) <= MATH_MAX(p1.y, p2.y))) {
return enableReverse_ ? true : false;
}
return false;
}
void UIChartPolyline::FindCrossPoints(const ChartLine& line, const ChartLine& polyLine, CrossPointSet& cross)
{
if (GetLineCrossPoint(line.start, line.end, polyLine.start, polyLine.end, cross.nextFirst)) {
if (enableReverse_ && (MATH_MIN(line.start.y, line.end.y) >= MATH_MAX(polyLine.start.y, polyLine.end.y))) {
cross.firstFind = true;
cross.secondFind = true;
return;
}
if (!cross.firstFind) {
/* first corss must on the line like "/" */
if (polyLine.start.y < polyLine.end.y) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册