Improved the code used to draw a line between the different OxyPlot subplots.
1.1 Binary file External/OxyPlot.WindowsForms.dll has changed
2.1 Binary file External/OxyPlot.dll has changed
3.1 --- a/External/OxyPlot/OxyPlot/PlotModel/PlotModel.Rendering.cs Sun Jul 14 13:57:13 2013 +0000
3.2 +++ b/External/OxyPlot/OxyPlot/PlotModel/PlotModel.Rendering.cs Sun Jul 14 14:04:44 2013 +0000
3.3 @@ -302,37 +302,53 @@
3.4 {
3.5 rc.DrawRectangleAsPolygon(this.PlotArea, null, this.PlotAreaBorderColor, this.PlotAreaBorderThickness);
3.6
3.7 - foreach (var axis in this.Axes) {
3.8 - var actualMinimum = axis.Transform(axis.ActualMinimum);
3.9 - var actualMaximum = axis.Transform(axis.ActualMaximum);
3.10 + foreach (var axis in this.Axes)
3.11 + {
3.12 + if (!axis.IsAxisVisible)
3.13 + continue;
3.14
3.15 - if (!axis.IsAxisVisible)
3.16 - continue;
3.17 + if (axis.IsHorizontal())
3.18 + {
3.19 + var start = this.PlotArea.Left +
3.20 + this.PlotArea.Width * axis.StartPosition;
3.21 + if (axis.StartPosition < 1 && axis.StartPosition > 0)
3.22 + rc.DrawLine(new[] {
3.23 + new ScreenPoint(start, this.PlotArea.Top),
3.24 + new ScreenPoint(start, this.PlotArea.Bottom) },
3.25 + this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
3.26 + null, OxyPenLineJoin.Miter, true);
3.27
3.28 - if (axis.IsHorizontal()) {
3.29 - rc.DrawLine(new[] {
3.30 - new ScreenPoint(actualMinimum, this.PlotArea.Top),
3.31 - new ScreenPoint(actualMinimum, this.PlotArea.Bottom) },
3.32 - this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
3.33 - null, OxyPenLineJoin.Miter, true);
3.34 - rc.DrawLine(new[] {
3.35 - new ScreenPoint(actualMaximum, this.PlotArea.Top),
3.36 - new ScreenPoint(actualMaximum, this.PlotArea.Bottom) },
3.37 - this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
3.38 - null, OxyPenLineJoin.Miter, true);
3.39 - } else {
3.40 - rc.DrawLine(new[] {
3.41 - new ScreenPoint(this.PlotArea.Left, actualMinimum),
3.42 - new ScreenPoint(this.PlotArea.Right, actualMinimum) },
3.43 - this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
3.44 - null, OxyPenLineJoin.Miter, true);
3.45 - rc.DrawLine(new[] {
3.46 - new ScreenPoint(this.PlotArea.Left, actualMinimum),
3.47 - new ScreenPoint(this.PlotArea.Right, actualMinimum) },
3.48 - this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
3.49 - null, OxyPenLineJoin.Miter, true);
3.50 - }
3.51 + var end = this.PlotArea.Left +
3.52 + this.PlotArea.Width * axis.EndPosition;
3.53 + if (axis.EndPosition < 1 && axis.EndPosition > 0)
3.54 + rc.DrawLine(new[] {
3.55 + new ScreenPoint(end, this.PlotArea.Top),
3.56 + new ScreenPoint(end, this.PlotArea.Bottom) },
3.57 + this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
3.58 + null, OxyPenLineJoin.Miter, true);
3.59 + }
3.60 + else
3.61 + {
3.62 + var start = this.PlotArea.Bottom -
3.63 + this.PlotArea.Height * axis.StartPosition;
3.64 + if (axis.StartPosition < 1 && axis.StartPosition > 0)
3.65 + rc.DrawLine(new[] {
3.66 + new ScreenPoint(this.PlotArea.Left, start),
3.67 + new ScreenPoint(this.PlotArea.Right, start) },
3.68 + this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
3.69 + null, OxyPenLineJoin.Miter, true);
3.70 +
3.71 + var end = this.PlotArea.Bottom -
3.72 + this.PlotArea.Height * axis.EndPosition;
3.73 + if (axis.EndPosition < 1 && axis.EndPosition > 0)
3.74 + rc.DrawLine(new[] {
3.75 + new ScreenPoint(this.PlotArea.Left, end),
3.76 + new ScreenPoint(this.PlotArea.Right, end) },
3.77 + this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
3.78 + null, OxyPenLineJoin.Miter, true);
3.79 + }
3.80 }
3.81 +
3.82 }
3.83 }
3.84