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


C# Graphics.EnumerateMetafile方法代碼示例

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


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

示例1: ProcessEMF

 public void ProcessEMF(byte[] emf)
 {
     try
     {
         _ms = new MemoryStream(emf);
         _mf = new Metafile(_ms);
         _bm = new Bitmap(1, 1);
         g = Graphics.FromImage(_bm);
         //XScale = Width / _mf.Width;
         //YScale = Height/ _mf.Height;
         m_delegate = new Graphics.EnumerateMetafileProc(MetafileCallback);
         g.EnumerateMetafile(_mf, new Point(0, 0), m_delegate);
     }
     finally
     {
         if (g != null)
             g.Dispose();
         if (_bm != null)
             _bm.Dispose();
         if (_ms != null)
         {
             _ms.Close();
             _ms.Dispose();
         }
     }
 }
開發者ID:NelsonSantos,項目名稱:fyiReporting-Android,代碼行數:26,代碼來源:EMF.cs

示例2: ReportDrawPage

 // Method to draw the current emf memory stream
 private void ReportDrawPage(Graphics graphics)
 {
     if (m_currentPageStream == null || m_currentPageStream.Length == 0 || m_metafile == null)
         return;
     // Set metafile delegate.
     m_delegate = new Graphics.EnumerateMetafileProc(MetafileCallback);
     // Draw in the rectangle
     Point destPoint = new Point(0, 0);
     graphics.EnumerateMetafile(m_metafile, destPoint, m_delegate);
     // Clean up
     m_delegate = null;
 }
開發者ID:EricCote,項目名稱:ReportingServices2008,代碼行數:13,代碼來源:PrinterDeliveryProvider.cs

示例3: ReportDrawPage

        // Method to draw the current emf memory stream 
        private void ReportDrawPage(Graphics g)
        {
            if (null == m_currentPageStream || 0 == m_currentPageStream.Length || null == m_metafile)
                return;
            lock (this)
            {
                // Set the metafile delegate.
                int width = m_metafile.Width;
                int height = m_metafile.Height;
                m_delegate = new Graphics.EnumerateMetafileProc(MetafileCallback);
                // Draw in the rectangle
                Point[] points = new Point[3];
                Point destPoint = new Point(0, 0);
                Point destPoint1 = new Point(width, 0);
                Point destPoint2 = new Point(0, height);

                points[0] = destPoint;
                points[1] = destPoint1;
                points[2] = destPoint2;

                g.EnumerateMetafile(m_metafile, points, m_delegate);
                // Clean up
                m_delegate = null;
            }
        }
開發者ID:graschiii,項目名稱:printit-now-q,代碼行數:26,代碼來源:ReportPrinter.cs


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