本文整理匯總了C#中PdfSharp.Drawing.XGraphicsPath.RealizeGdiPath方法的典型用法代碼示例。如果您正苦於以下問題:C# XGraphicsPath.RealizeGdiPath方法的具體用法?C# XGraphicsPath.RealizeGdiPath怎麽用?C# XGraphicsPath.RealizeGdiPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PdfSharp.Drawing.XGraphicsPath
的用法示例。
在下文中一共展示了XGraphicsPath.RealizeGdiPath方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SetClip
/// <summary>
/// Sets the clipping region to the specified graphical path.
/// </summary>
public void SetClip(XGraphicsPath path, XCombineMode combineMode)
{
if (path == null)
throw new ArgumentNullException("path");
if (combineMode != XCombineMode.Replace && combineMode != XCombineMode.Intersect)
throw new ArgumentException("Only XCombineMode.Replace and XCombineMode.Intersect are currently supported by PDFsharp.", "combineMode");
if (this.drawGraphics)
this.gfx.SetClip(path.RealizeGdiPath(), (CombineMode)combineMode);
if (this.renderer != null)
this.renderer.SetClip(path, combineMode);
}
示例2: DrawPath
// ----- fill -----
/// <summary>
/// Draws a graphical path.
/// </summary>
public void DrawPath(XBrush brush, XGraphicsPath path)
{
if (brush == null)
throw new ArgumentNullException("brush");
if (path == null)
throw new ArgumentNullException("path");
if (this.drawGraphics)
this.gfx.FillPath(brush.RealizeGdiBrush(), path.RealizeGdiPath());
if (this.renderer != null)
this.renderer.DrawPath(null, brush, path);
}