From df66f5c7eef5fcb915531f0274c86909da4aa629 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Wed, 29 May 2024 13:14:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0`3D`=E5=9D=90=E6=A0=87?= =?UTF-8?q?=E7=B3=BB=E6=98=BE=E7=A4=BA=E8=BE=B9=E6=A1=86=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Coord/Grid3D/GridCoord3DHandler.cs | 31 +++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/Runtime/Coord/Grid3D/GridCoord3DHandler.cs b/Runtime/Coord/Grid3D/GridCoord3DHandler.cs index 4dcf685b..5168d368 100644 --- a/Runtime/Coord/Grid3D/GridCoord3DHandler.cs +++ b/Runtime/Coord/Grid3D/GridCoord3DHandler.cs @@ -12,7 +12,7 @@ namespace XCharts.Runtime { var grid = component; grid.painter = chart.painter; - grid.refreshComponent = delegate() + grid.refreshComponent = delegate () { grid.UpdateRuntimeData(chart); chart.OnCoordinateChanged(); @@ -49,19 +49,9 @@ namespace XCharts.Runtime } } - public override void DrawBase(VertexHelper vh) - { - if (!SeriesHelper.IsAnyClipSerie(chart.series)) - { - DrawCoord(vh, component); - } - } public override void DrawUpper(VertexHelper vh) { - if (SeriesHelper.IsAnyClipSerie(chart.series)) - { - DrawCoord(vh, component); - } + DrawCoord(vh, component); } private void DrawCoord(VertexHelper vh, GridCoord3D grid) @@ -69,11 +59,20 @@ namespace XCharts.Runtime if (!grid.show) return; if (grid.showBorder) { - var borderWidth = chart.theme.axis.lineWidth * 2; + var borderWidth = chart.theme.axis.lineWidth; var borderColor = chart.theme.axis.lineColor; - UGL.DrawBorder(vh, grid.context.maxRect, borderWidth, borderColor); - // UGL.DrawBorder(vh, grid.context.center, grid.context.width - borderWidth, - // grid.context.height - borderWidth, borderWidth, borderColor); + if (grid.IsLeft()) + { + UGL.DrawLine(vh, grid.context.pointA, grid.context.pointE, borderWidth, borderColor); + UGL.DrawLine(vh, grid.context.pointE, grid.context.pointF, borderWidth, borderColor); + UGL.DrawLine(vh, grid.context.pointE, grid.context.pointH, borderWidth, borderColor); + } + else + { + UGL.DrawLine(vh, grid.context.pointD, grid.context.pointH, borderWidth, borderColor); + UGL.DrawLine(vh, grid.context.pointE, grid.context.pointH, borderWidth, borderColor); + UGL.DrawLine(vh, grid.context.pointG, grid.context.pointH, borderWidth, borderColor); + } } } }