[feature][AreaStyle] support innerFill

This commit is contained in:
monitor1394
2022-08-09 08:29:06 +08:00
parent d1f9c77571
commit f1f2ea78be
9 changed files with 42 additions and 11 deletions

View File

@@ -24,11 +24,17 @@ namespace XCharts.Runtime
public static void DrawSerieLineArea(VertexHelper vh, Serie serie, Serie lastStackSerie,
ThemeStyle theme, VisualMap visualMap, bool isY, Axis axis, Axis relativedAxis, GridCoord grid)
{
Color32 srcAreaColor, srcAreaToColor;
if (!SerieHelper.GetAreaColor(out srcAreaColor, out srcAreaToColor, serie, null, theme, serie.context.colorIndex))
Color32 areaColor, areaToColor;
bool innerFill;
if (!SerieHelper.GetAreaColor(out areaColor, out areaToColor, out innerFill, serie, null, theme, serie.context.colorIndex))
{
return;
}
if (innerFill)
{
UGL.DrawPolygon(vh, serie.context.dataPoints, areaColor);
return;
}
var gridXY = (isY ? grid.context.x : grid.context.y);
if (lastStackSerie == null)
{
@@ -36,8 +42,8 @@ namespace XCharts.Runtime
gridXY + relativedAxis.context.offset,
gridXY,
gridXY + (isY ? grid.context.width : grid.context.height),
srcAreaColor,
srcAreaToColor,
areaColor,
areaToColor,
visualMap,
axis,
relativedAxis,
@@ -49,8 +55,8 @@ namespace XCharts.Runtime
gridXY + relativedAxis.context.offset,
gridXY,
gridXY + (isY ? grid.context.width : grid.context.height),
srcAreaColor,
srcAreaToColor,
areaColor,
areaToColor,
visualMap);
}
}