Changed OxyPlot to draw a line between the different subplots.

This commit is contained in:
Michael Möller
2013-06-09 17:17:32 +00:00
parent 3ab2982c85
commit 6260c63b71
2 changed files with 32 additions and 0 deletions
BIN
View File
Binary file not shown.
@@ -301,6 +301,38 @@ namespace OxyPlot
if (this.Axes.Count > 0)
{
rc.DrawRectangleAsPolygon(this.PlotArea, null, this.PlotAreaBorderColor, this.PlotAreaBorderThickness);
foreach (var axis in this.Axes) {
var actualMinimum = axis.Transform(axis.ActualMinimum);
var actualMaximum = axis.Transform(axis.ActualMaximum);
if (!axis.IsAxisVisible)
continue;
if (axis.IsHorizontal()) {
rc.DrawLine(new[] {
new ScreenPoint(actualMinimum, this.PlotArea.Top),
new ScreenPoint(actualMinimum, this.PlotArea.Bottom) },
this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
null, OxyPenLineJoin.Miter, true);
rc.DrawLine(new[] {
new ScreenPoint(actualMaximum, this.PlotArea.Top),
new ScreenPoint(actualMaximum, this.PlotArea.Bottom) },
this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
null, OxyPenLineJoin.Miter, true);
} else {
rc.DrawLine(new[] {
new ScreenPoint(this.PlotArea.Left, actualMinimum),
new ScreenPoint(this.PlotArea.Right, actualMinimum) },
this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
null, OxyPenLineJoin.Miter, true);
rc.DrawLine(new[] {
new ScreenPoint(this.PlotArea.Left, actualMinimum),
new ScreenPoint(this.PlotArea.Right, actualMinimum) },
this.PlotAreaBorderColor, this.PlotAreaBorderThickness,
null, OxyPenLineJoin.Miter, true);
}
}
}
}