当前位置: 首页>>代码示例>>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;未经允许,请勿转载。