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


C# Microsoft.Office.Interop.Visio.DrawBezier方法代码示例

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


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

示例1: draw_leaf

        private static IVisio.Shape draw_leaf(IVisio.Page page, VA.Drawing.Point p0)
        {
            var p1 = p0.Add(1, 1);
            var p2 = p1.Add(1, 0);
            var p3 = p2.Add(1, -1);
            var p4 = p3.Add(-1, -1);
            var p5 = p4.Add(-1, 0);
            var p6 = p5.Add(-1, 1);
            var bezier_points = new[] {p0, p1, p2, p3, p4, p5, p6};

            var s = page.DrawBezier(bezier_points);
            return s;
        }
开发者ID:shekharssorot2002,项目名称:VisioAutomation2.0,代码行数:13,代码来源:PlaygroundSamples.cs

示例2: RenderPie

        public IVisio.Shape RenderPie( IVisio.Page page)
        {
            if (this.Angle == 0.0)
            {
                var p1 = this.GetPointAtRadius(this.Center, this.Radius, this.SectorStartAngle);
                return page.DrawLine(this.Center, p1);
            }
            else if (this.Angle >= 2*System.Math.PI)
            {
                var A = this.Center.Add(-this.Radius, -this.Radius);
                var B = this.Center.Add(this.Radius, this.Radius);
                var rect = new VA.Drawing.Rectangle(A, B);
                var shape = page.DrawOval(rect);
                return shape;
            }
            else
            {
                int degree;
                var pie_bez = this.GetShapeBezierForPie(out degree);

                // Render the bezier
                var doubles_array = VA.Drawing.Point.ToDoubles(pie_bez).ToArray();
                var pie_slice = page.DrawBezier(doubles_array, (short)degree, 0);
                return pie_slice;
            }
        }
开发者ID:firestream99,项目名称:VisioAutomation,代码行数:26,代码来源:PieSlice.cs

示例3: RenderDoughnut

        public IVisio.Shape RenderDoughnut(IVisio.Page page)
        {
            double total_angle = this.Angle;

            if (total_angle == 0.0)
            {
                var p1 = this.GetPointAtRadius(this.Center, this.SectorStartAngle, this.InnerRadius);
                var p2 = this.GetPointAtRadius(this.Center, this.SectorStartAngle, this.Radius);
                var shape = page.DrawLine(p1, p2);
                return shape;
            }
            else if (total_angle >= System.Math.PI)
            {
                var outer_radius_point = new VA.Drawing.Point(this.Radius, this.Radius);
                var C = this.Center - outer_radius_point;
                var D = this.Center + outer_radius_point;
                var outer_rect = new VA.Drawing.Rectangle(C, D);

                var inner_radius_point = new VA.Drawing.Point(this.InnerRadius, this.InnerRadius);
                var A = this.Center - inner_radius_point - C;
                var B = this.Center + inner_radius_point - C;
                var inner_rect = new VA.Drawing.Rectangle(A, B);

                var shape = page.DrawOval(outer_rect);
                shape.DrawOval(inner_rect.Left, inner_rect.Bottom, inner_rect.Right, inner_rect.Top);

                return shape;
            }
            else
            {
                int degree;
                var thickarc = this.GetShapeBezierForDoughnut(out degree);

                // Render the bezier
                var doubles_array = VA.Drawing.Point.ToDoubles(thickarc).ToArray();
                var pie_slice = page.DrawBezier(doubles_array, (short)degree, 0);
                return pie_slice;
            }
        }
开发者ID:firestream99,项目名称:VisioAutomation,代码行数:39,代码来源:PieSlice.cs


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