當前位置: 首頁>>代碼示例>>C#>>正文


C# XGraphicsPath.RealizeGdiPath方法代碼示例

本文整理匯總了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);
    }
開發者ID:BackupTheBerlios,項目名稱:zp7-svn,代碼行數:17,代碼來源:XGraphics.cs

示例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);
    }
開發者ID:BackupTheBerlios,項目名稱:zp7-svn,代碼行數:18,代碼來源:XGraphics.cs


注:本文中的PdfSharp.Drawing.XGraphicsPath.RealizeGdiPath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。