IsAntiAlias围绕图形创建边界

时间:2013-06-25 01:18:44

标签: c# antialiasing zedgraph

这是我的表格与Zedgraph的截图:

http://eff1fan.com/antialias-false.png

这就是我想要的方式:灰色表格上的灰色图形;没有图表或图表边框。唯一的问题是别名。所以我补充一点:

zedGraphControl1.IsAntiAlias = true;

然后我明白了:

http://eff1fan.com/antialias-true.png

如何摆脱现在出现的图表顶部和左侧的部分边框?

2 个答案:

答案 0 :(得分:2)

zedgraphControl1.MasterPane.Border.IsVisible = false;

应该修理它。

答案 1 :(得分:1)

我在zedgraph源头挖了一下;找不到任何简单的原因/修复。所以,我只是关闭整个图形的抗锯齿(在设计器中),然后为各个组件打开它:

        myPane.XAxis.Title.FontSpec.IsAntiAlias = true;

        LineItem curve_x = new LineItem("x", x_values, sensor_x, Color.Red, SymbolType.None, 2.5F);
        LineItem curve_y = new LineItem("y", x_values, sensor_y, Color.Blue, SymbolType.None, 2.5F);
        LineItem curve_z = new LineItem("z", x_values, sensor_z, Color.Green, SymbolType.None, 2.5F);

        curve_x.Line.IsAntiAlias = true;
        curve_y.Line.IsAntiAlias = true;
        curve_z.Line.IsAntiAlias = true;

        myPane.XAxis.Scale.FontSpec.IsAntiAlias = true;
        myPane.YAxis.Scale.FontSpec.IsAntiAlias = true;

这就是诀窍。

http://www.eff1fan.com/antialias-workaround.png