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


C# GraphicsPath.AddLines方法代码示例

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


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

示例1: GetArrowLinePath

    public static GraphicsPath GetArrowLinePath(float x1, float y1, float x2, float y2,  bool include_arrow, float extra_thickness = 0)
    {
        var newPoints = GetArrowLinePoints(x1, y1, x2, y2, extra_thickness);

        var path = new GraphicsPath(FillMode.Winding);
        path.AddLines(newPoints.ToArray());
        //if (include_arrow)
        //    path.AddLines(GetArrowPoints(x2, y2, extra_thickness).ToArray());
        //path.CloseFigure();
        return path;
    }
开发者ID:idursun,项目名称:StateMachines,代码行数:11,代码来源:GraphUtils.cs

示例2: GetOutlinePath

 protected override GraphicsPath GetOutlinePath(int index)
 {
     Point[] pts = new Point[8]();
     if (Appearance == WeifenLuo.WinFormsUI.DockPane.AppearanceStyle.Document)
     {
         Rectangle rectTab = GetTabRectangle(index);
         rectTab.Intersect(TabsRectangle);
         int y = DockPane.PointToClient(PointToScreen(new Point(0, rectTab.Bottom))).Y;
         Rectangle rectPaneClient = DockPane.ClientRectangle;
         pts[0] = DockPane.PointToScreen(new Point(rectPaneClient.Left, y));
         pts[1] = PointToScreen(new Point(rectTab.Left, rectTab.Bottom));
         pts[2] = PointToScreen(new Point(rectTab.Left, rectTab.Top));
         pts[3] = PointToScreen(new Point(rectTab.Right + _DocumentTabOverlap, rectTab.Top));
         pts[4] = PointToScreen(new Point(rectTab.Right + _DocumentTabOverlap, rectTab.Bottom));
         pts[5] = DockPane.PointToScreen(new Point(rectPaneClient.Right, y));
         pts[6] = DockPane.PointToScreen(new Point(rectPaneClient.Right, rectPaneClient.Bottom));
         pts[7] = DockPane.PointToScreen(new Point(rectPaneClient.Left, rectPaneClient.Bottom));
     }
     else
     {
         Rectangle rectTab = GetTabRectangle(index);
         rectTab.Intersect(TabsRectangle);
         int y = DockPane.PointToClient(PointToScreen(new Point(0, rectTab.Top))).Y + 1;
         Rectangle rectPaneClient = DockPane.ClientRectangle;
         pts[0] = DockPane.PointToScreen(new Point(rectPaneClient.Left, rectPaneClient.Top));
         pts[1] = DockPane.PointToScreen(new Point(rectPaneClient.Right, rectPaneClient.Top));
         pts[2] = DockPane.PointToScreen(new Point(rectPaneClient.Right, y));
         pts[3] = PointToScreen(new Point(rectTab.Right + 1, rectTab.Top));
         pts[4] = PointToScreen(new Point(rectTab.Right + 1, rectTab.Bottom));
         pts[5] = PointToScreen(new Point(rectTab.Left + 1, rectTab.Bottom));
         pts[6] = PointToScreen(new Point(rectTab.Left + 1, rectTab.Top));
         pts[7] = DockPane.PointToScreen(new Point(rectPaneClient.Left, y));
     }
     GraphicsPath path = new GraphicsPath();
     path.AddLines(pts);
     return path;
 }
开发者ID:okyereadugyamfi,项目名称:softlogik,代码行数:37,代码来源:DockPaneStripFromBase.cs


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