Exemplo n.º 1
0
 private void SetClipboard(IEnumerable <IBaseShape> shapes, double width, double height, IImageCache ic)
 {
     using (var bitmap = new Bitmap((int)width, (int)height))
     {
         var writer = new EmfWriter(_serviceProvider);
         using (var ms = writer.MakeMetafileStream(bitmap, shapes, ic))
         {
             SetClipboard(ms);
         }
     }
 }
Exemplo n.º 2
0
        private void SetClipboard(IPageContainer container, IImageCache ic)
        {
            var writer = new EmfWriter(_serviceProvider);

            using (var bitmap = new Bitmap((int)container.Template.Width, (int)container.Template.Height))
            {
                using (var ms = writer.MakeMetafileStream(bitmap, container, ic))
                {
                    SetClipboard(ms);
                }
            }
        }