提交 541887d1 编写于 作者: S swx1094762

Description:The UIChart control has a black line when drawing the altitude pressure curve

issuesno:#I6IZR6
Sig:SIG_ApplicationFramework
Feature or Bugfix:Feature
Binary Source:NO
Signed-off-by: Nswx1094762 <shiqichang@huawei.com>
上级 e1e9b286
......@@ -678,12 +678,34 @@ 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))) {
if (!cross.firstFind) {
if (polyLine.start.y < polyLine.end.y) {
cross.first = cross.nextFirst;
cross.firstFind = false;
}
} else if (!cross.secondFind) {
if ((cross.first.x != cross.nextFirst.x) || (cross.first.y != cross.nextFirst.y)) {
cross.second = cross.nextFirst;
cross.secondFind = true;
return;
}
if (polyLine.start.y > polyLine.end.y) {
cross.firstFind = 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.
先完成此消息的编辑!
想要评论请 注册