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


C# DrawingContext.DrawPolyline方法代码示例

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


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

示例1: DrawEquation

 public override void DrawEquation(DrawingContext dc)
 {
     dc.DrawPolyline(new Point(Left, Bottom - Height * .4),
                            new PointCollection
                             {
                                 new Point(Left + FontSize * .2, Bottom - Height * .5),
                                 new Point(Left + FontSize * .2, Bottom - Height * .5),
                                 new Point(Left + FontSize * .4, Bottom),
                                 new Point(Left + FontSize * .4, Bottom),
                                 new Point(Right - FontSize * .1, Top + FontSize * .1),
                                 new Point(Right - FontSize * .1, Top + FontSize * .1),
                                 new Point(ParentEquation.Right, Top + FontSize * .1),
                             },
                            StandardPen);
 }
开发者ID:JackWangCUMT,项目名称:math-editor,代码行数:15,代码来源:RadicalSign.cs

示例2: DrawEquation

 public override void DrawEquation(DrawingContext dc)
 {
     dc.DrawPolyline(new Point(ParentEquation.Right, Bottom), new PointCollection{new Point(Left, Bottom), new Point(Right, Top)}, StandardRoundPen);
 }
开发者ID:JackWangCUMT,项目名称:math-editor,代码行数:4,代码来源:DivTriangleSign.cs

示例3: DrawEquation

 public override void DrawEquation(DrawingContext dc)
 {
     switch (decorationType)
     {
         case DecorationType.Bar:
             dc.DrawLine(ThinPen, Location, new Point(Right, Top));
             break;
         case DecorationType.DoubleBar:
             dc.DrawLine(ThinPen, Location, new Point(Right, Top));
             dc.DrawLine(ThinPen, new Point(Left, Bottom - ThinPen.Thickness),
                                      new Point(Right, Bottom - ThinPen.Thickness));
             break;
         case DecorationType.Hat:
             dc.DrawPolyline(new Point(Left, Bottom - FontSize * .02),
                             new PointCollection
                             {
                                 new Point(MidX, Top + FontSize * .03),
                                 new Point(Right, Bottom - FontSize * .02)
                             },
                             ThinPen);
             break;
         case DecorationType.LeftArrow:
             firstSign.DrawTextTopLeftAligned(dc, Location);
             dc.DrawLine(ThinPen, new Point(Left + FontSize * .06, MidY), new Point(Right, MidY));
             break;
         case DecorationType.RightArrow:
             firstSign.DrawTextTopRightAligned(dc, new Point(Right, Top));
             dc.DrawLine(ThinPen, new Point(Left, MidY), new Point(Right - FontSize * .06, MidY));
             break;
         case DecorationType.DoubleArrow:
             DrawDoubleArrow(dc);
             break;
         case DecorationType.Parenthesis:
             DrawParentheses(dc);
             break;
         case DecorationType.RightHarpoonUpBarb:
             DrawRightHarpoonUpBarb(dc);
             break;
         case DecorationType.RightHarpoonDownBarb:
             DrawRightHarpoonDownBarb(dc);
             break;
         case DecorationType.LeftHarpoonUpBarb:
             DrawLeftHarpoonUpBarb(dc);
             break;
         case DecorationType.LeftHarpoonDownBarb:
             DrawLeftHarpoonDownBarb(dc);
             break;
         case DecorationType.Tilde:
             firstSign.DrawTextTopLeftAligned(dc, Location);
             break;
         case DecorationType.Tortoise:
             DrawTortoise(dc);
             break;
         case DecorationType.Cross:
             dc.DrawLine(ThinPen, ParentEquation.Location, new Point(Right, ParentEquation.Bottom));
             dc.DrawLine(ThinPen, new Point(Left, ParentEquation.Bottom), new Point(Right, ParentEquation.Top));
             break;
         case DecorationType.LeftCross:
             dc.DrawLine(ThinPen, ParentEquation.Location, new Point(Right, ParentEquation.Bottom));
             break;
         case DecorationType.RightCross:
             dc.DrawLine(ThinPen, new Point(Left, ParentEquation.Bottom), new Point(Right, ParentEquation.Top));
             break;
         case DecorationType.StrikeThrough:
             dc.DrawLine(ThinPen, new Point(Left, ParentEquation.MidY), new Point(Right, ParentEquation.MidY));
             break;
     }
 }
开发者ID:JackWangCUMT,项目名称:math-editor,代码行数:68,代码来源:DecorationDrawing.cs

示例4: PaintRightAngle

 void PaintRightAngle(DrawingContext dc)
 {
     PointCollection points = new PointCollection { new Point(SignRight, MidY), new Point(SignLeft, Bottom) };
     dc.DrawPolyline(new Point(SignLeft, Top), points, ThinPen);
 }
开发者ID:JackWangCUMT,项目名称:math-editor,代码行数:5,代码来源:BracketSign.cs


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