当前位置: 首页>>代码示例>>C#>>正文


C# LinearAxis.Draw方法代码示例

本文整理汇总了C#中LinearAxis.Draw方法的典型用法代码示例。如果您正苦于以下问题:C# LinearAxis.Draw方法的具体用法?C# LinearAxis.Draw怎么用?C# LinearAxis.Draw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LinearAxis的用法示例。


在下文中一共展示了LinearAxis.Draw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DrawAxisTests

        private void DrawAxisTests(Context ctx, Rectangle bounds)
        {
            LinearAxis a = new LinearAxis (0, 10);
            Rectangle boundingBox;

            a.Draw (ctx, new Point (30,10), new Point (30, 200), out boundingBox);

            a.Reversed = true;
            a.Draw (ctx, new Point (60,10), new Point (60, 200), out boundingBox);

            a.SmallTickSize = 0;
            a.Draw (ctx, new Point(90,10), new Point(90, 200), out boundingBox);

            a.LargeTickStep = 2.5;
            a.Draw (ctx, new Point(120,10), new Point(120,200), out boundingBox);

            a.NumberOfSmallTicks = 5;
            a.SmallTickSize = 2;
            a.Draw (ctx, new Point(150,10), new Point(150,200), out boundingBox);

            a.LineColor = Colors.DarkBlue;
            a.Draw (ctx, new Point(180,10), new Point(180,200), out boundingBox);

            a.TickTextColor= Colors.DarkBlue;
            a.Draw (ctx, new Point(210,10), new Point(210,200), out boundingBox);

            a.TickTextColor = Colors.Black;
            a.Draw (ctx, new Point(240,10), new Point(300,200), out boundingBox);

            a.WorldMax = 100000;
            a.WorldMin = -3;
            a.LargeTickStep = double.NaN;
            a.Draw (ctx, new Point(330,10), new Point(330,200), out boundingBox);

            a.NumberFormat = "{0:0.0E+0}";
            a.Draw (ctx, new Point(380,10), new Point(380,200), out boundingBox);

            // Test for default TicksAngle on positive X-axis, ie Ticks below X-axis
            LinearAxis aX = new LinearAxis (0, 10);
            aX.Draw (ctx, new Point(30,240), new Point(380, 240), out boundingBox);

            // Set TicksAngle to PI/4 anti-clockwise from positive X-axis direction
            aX.TicksAngle = Math.PI / 4.0;
            aX.Draw (ctx, new Point (30,280), new Point (380, 280), out boundingBox);
        }
开发者ID:hwthomas,项目名称:XwPlot,代码行数:45,代码来源:AxisTests.cs


注:本文中的LinearAxis.Draw方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。