修复圆角绘制异常的问题

This commit is contained in:
monitor1394
2020-05-22 08:25:57 +08:00
parent 5a88b1dffc
commit 6baaa840d0
3 changed files with 24 additions and 18 deletions

View File

@@ -263,7 +263,7 @@ namespace XCharts
var backgroundName = s_BackgroundObjectName + GetInstanceID();
m_BackgroundRoot = ChartHelper.AddObject(backgroundName, transform.parent, m_ChartMinAnchor,
m_ChartMaxAnchor, m_ChartPivot, m_ChartSizeDelta);
//m_BackgroundRoot.hideFlags = chartHideFlags;
m_BackgroundRoot.hideFlags = chartHideFlags;
var backgroundImage = ChartHelper.GetOrAddComponent<Image>(m_BackgroundRoot);
var backgroundRect = m_BackgroundRoot.GetComponent<RectTransform>();
backgroundRect.position = rectTransform.position;

View File

@@ -316,7 +316,7 @@ namespace XCharts
{
CheckClipAndDrawPolygon(vh, plb, plt, prt, prb, areaColor, areaToColor, serie.clip);
}
ChartDrawer.DrawBorder(vh, center, itemWidth, itemHeight, borderWidth, borderColor, 0, itemStyle.cornerRadius);
ChartDrawer.DrawBorder(vh, center, itemWidth, itemHeight, borderWidth, borderColor, 0, itemStyle.cornerRadius, isYAxis);
}
}
else
@@ -342,7 +342,7 @@ namespace XCharts
{
CheckClipAndDrawPolygon(vh, ref prb, ref plb, ref plt, ref prt, areaColor, areaToColor, serie.clip);
}
ChartDrawer.DrawBorder(vh, center, itemWidth, itemHeight, borderWidth, borderColor, 0, itemStyle.cornerRadius);
ChartDrawer.DrawBorder(vh, center, itemWidth, itemHeight, borderWidth, borderColor, 0, itemStyle.cornerRadius, isYAxis);
}
}
}