增加MarkLine标线 (#142)

This commit is contained in:
monitor1394
2021-07-15 21:18:23 +08:00
parent 9da1b9cca6
commit 162aeb02e6
20 changed files with 1050 additions and 97 deletions

View File

@@ -15,9 +15,10 @@ namespace XCharts
{
public static class ChartDrawer
{
public static void DrawSymbol(VertexHelper vh, SerieSymbolType type, float symbolSize,
float tickness, Vector3 pos, Color32 color, Color32 toColor, float gap, float[] cornerRadius,
Color32 backgroundColor, float smoothness)
Color32 backgroundColor, float smoothness, Vector3 startPos)
{
switch (type)
{
@@ -77,6 +78,14 @@ namespace XCharts
UGL.DrawDiamond(vh, pos, symbolSize, color, toColor);
}
break;
case SerieSymbolType.Arrow:
var arrowWidth = symbolSize * 2;
var arrowHeight = arrowWidth * 1.5f;
var arrowOffset = 0;
var arrowDent = arrowWidth / 3.3f;
UGL.DrawArrow(vh, startPos, pos, arrowWidth, arrowHeight,
arrowOffset, arrowDent, color);
break;
}
}