本文整理汇总了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);
}
示例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);
}
示例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;
}
}
示例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);
}