本文整理汇总了C#中OxyPenLineJoin.ToLineJoin方法的典型用法代码示例。如果您正苦于以下问题:C# OxyPenLineJoin.ToLineJoin方法的具体用法?C# OxyPenLineJoin.ToLineJoin怎么用?C# OxyPenLineJoin.ToLineJoin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OxyPenLineJoin
的用法示例。
在下文中一共展示了OxyPenLineJoin.ToLineJoin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawPolygon
/// <summary>
/// Draws the polygon.
/// </summary>
/// <param name="points">The points.</param>
/// <param name="fill">The fill.</param>
/// <param name="stroke">The stroke.</param>
/// <param name="thickness">The thickness.</param>
/// <param name="dashArray">The dash array.</param>
/// <param name="lineJoin">The line join.</param>
/// <param name="aliased">if set to <c>true</c> [aliased].</param>
public override void DrawPolygon(
IList<ScreenPoint> points,
OxyColor fill,
OxyColor stroke,
double thickness,
double[] dashArray,
OxyPenLineJoin lineJoin,
bool aliased)
{
if (fill.IsVisible() && points.Count >= 2)
{
// g.SmoothingMode = aliased ? SmoothingMode.None : SmoothingMode.HighQuality; // TODO: Smoothing modes
this.g.Save();
this.g.SetSourceColor(fill);
this.g.LineJoin = lineJoin.ToLineJoin();
this.g.LineWidth = thickness;
if (dashArray != null)
{
this.g.SetDash(dashArray, 0);
}
this.g.MoveTo(points[0].ToPointD(aliased));
foreach (var point in points.Skip(1))
{
this.g.LineTo(point.ToPointD(aliased));
}
// g.LineTo(points[0].ToPointD(aliased));
this.g.ClosePath();
this.g.Fill();
this.g.Restore();
}
if (stroke.IsVisible() && thickness > 0 && points.Count >= 2)
{
// g.SmoothingMode = aliased ? SmoothingMode.None : SmoothingMode.HighQuality; // TODO: Smoothing modes
this.g.Save();
this.g.SetSourceColor(stroke);
this.g.LineJoin = lineJoin.ToLineJoin();
this.g.LineWidth = thickness;
if (dashArray != null)
{
this.g.SetDash(dashArray, 0);
}
this.g.MoveTo(points[0].ToPointD(aliased));
foreach (var point in points.Skip(1))
{
this.g.LineTo(point.ToPointD(aliased));
}
this.g.ClosePath();
this.g.Stroke();
this.g.Restore();
}
}