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


C# XMatrix.ToGdiMatrix方法代碼示例

本文整理匯總了C#中PdfSharp.Drawing.XMatrix.ToGdiMatrix方法的典型用法代碼示例。如果您正苦於以下問題:C# XMatrix.ToGdiMatrix方法的具體用法?C# XMatrix.ToGdiMatrix怎麽用?C# XMatrix.ToGdiMatrix使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PdfSharp.Drawing.XMatrix的用法示例。


在下文中一共展示了XMatrix.ToGdiMatrix方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Widen

        /// <summary>
        /// Replaces this path with curves that enclose the area that is filled when this path is drawn 
        /// by the specified pen.
        /// </summary>
        public void Widen(XPen pen, XMatrix matrix, double flatness)
        {
#if CORE
            // Just do nothing.
#endif
#if CORE__
            throw new NotImplementedException("XGraphicsPath.Widen");
#endif
#if GDI
            try
            {
                Lock.EnterGdiPlus();
                _gdipPath.Widen(pen.RealizeGdiPen(), matrix.ToGdiMatrix(), (float)flatness);
            }
            finally { Lock.ExitGdiPlus(); }
#endif
#if WPF || NETFX_CORE
#if !SILVERLIGHT && !NETFX_CORE
            _pathGeometry = _pathGeometry.GetWidenedPathGeometry(pen.RealizeWpfPen());
#else
            // AG-HACK
            throw new InvalidOperationException("Silverlight/WinRT cannot widen a geometry.");
            // TODO: no, yagni
#endif
#endif
        }
開發者ID:Core2D,項目名稱:PDFsharp,代碼行數:30,代碼來源:XGraphicsPath.cs

示例2: Flatten

        /// <summary>
        /// Converts each curve in this XGraphicsPath into a sequence of connected line segments. 
        /// </summary>
        public void Flatten(XMatrix matrix)
        {
#if CORE
            // Just do nothing.
#endif
#if GDI
            try
            {
                Lock.EnterGdiPlus();
                _gdipPath.Flatten(matrix.ToGdiMatrix());
            }
            finally { Lock.ExitGdiPlus(); }
#endif
#if WPF || NETFX_CORE
#if !SILVERLIGHT && !NETFX_CORE
            _pathGeometry = _pathGeometry.GetFlattenedPathGeometry();
            _pathGeometry.Transform = new MatrixTransform(matrix.ToWpfMatrix());
#else
            // AGHACK
            throw new InvalidOperationException("Silverlight/WinRT cannot flatten a geometry.");
            // TODO: no, yagni
#endif
#endif
        }
開發者ID:Core2D,項目名稱:PDFsharp,代碼行數:27,代碼來源:XGraphicsPath.cs

示例3: Widen

    /// <summary>
    /// Replaces this path with curves that enclose the area that is filled when this path is drawn 
    /// by the specified pen.
    /// </summary>
    public void Widen(XPen pen, XMatrix matrix, double flatness)
    {
#if GDI
      this.gdipPath.Widen(pen.RealizeGdiPen(), matrix.ToGdiMatrix(), (float)flatness);
#endif
#if WPF
      this.pathGeometry = this.pathGeometry.GetWidenedPathGeometry(pen.RealizeWpfPen());
#endif
    }
開發者ID:AnthonyNystrom,項目名稱:Pikling,代碼行數:13,代碼來源:XGraphicsPath.cs

示例4: Flatten

    /// <summary>
    /// Converts each curve in this XGraphicsPath into a sequence of connected line segments. 
    /// </summary>
    public void Flatten(XMatrix matrix, double flatness)
    {
#if GDI
      this.gdipPath.Flatten(matrix.ToGdiMatrix(), (float)flatness);
#endif
#if WPF
      // TODOWPF: matrix
      this.pathGeometry = this.pathGeometry.GetFlattenedPathGeometry();
#endif
    }
開發者ID:AnthonyNystrom,項目名稱:Pikling,代碼行數:13,代碼來源:XGraphicsPath.cs

示例5: Widen

    /// <summary>
    /// Replaces this path with curves that enclose the area that is filled when this path is drawn 
    /// by the specified pen.
    /// </summary>
    public void Widen(XPen pen, XMatrix matrix)
    {
#if GDI
      this.gdipPath.Widen(pen.RealizeGdiPen(), matrix.ToGdiMatrix());
#endif
#if WPF
#if !SILVERLIGHT
      this.pathGeometry = this.pathGeometry.GetWidenedPathGeometry(pen.RealizeWpfPen());
#else
      // AGHACK
#endif
#endif
    }
開發者ID:inexorabletash,項目名稱:PDFsharp,代碼行數:17,代碼來源:XGraphicsPath.cs

示例6: Flatten

    /// <summary>
    /// Converts each curve in this XGraphicsPath into a sequence of connected line segments. 
    /// </summary>
    public void Flatten(XMatrix matrix, double flatness)
    {
#if GDI
      this.gdipPath.Flatten(matrix.ToGdiMatrix(), (float)flatness);
#endif
#if WPF
#if !SILVERLIGHT
      this.pathGeometry = this.pathGeometry.GetFlattenedPathGeometry();
      // TODO: matrix handling not yet tested
      if (!matrix.IsIdentity)
        this.pathGeometry.Transform = new MatrixTransform(matrix.ToWpfMatrix());
#else
      // AGHACK
#endif
#endif
    }
開發者ID:inexorabletash,項目名稱:PDFsharp,代碼行數:19,代碼來源:XGraphicsPath.cs


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