171 instantiations of Metafile
PresentationFramework-SystemDrawing (3)
SystemDrawingExtension.cs (3)
61
return new
Metafile
(hMetafile, false);
100
Metafile metafile = new
Metafile
(handle, false);
129
Metafile metafile = new
Metafile
(metafileStream);
System.Drawing.Common.Tests (138)
mono\System.Imaging\MetafileTest.cs (12)
46
using Metafile mf =
new
(filename);
94
using Metafile mf =
new
(Helpers.GetTestBitmapPath(WmfPlaceable));
109
using Metafile mf =
new
(fs);
125
using Metafile mf =
new
(ms);
161
using Metafile mf =
new
(Helpers.GetTestBitmapPath(Emf));
170
using Metafile mf =
new
(fs);
180
using Metafile mf =
new
(ms);
221
Metafile mf =
new
(hdc, new Rectangle());
238
Metafile mf =
new
(hdc, new RectangleF());
254
Metafile mf =
new
(stream, hdc, type);
295
mf = new
Metafile
(hdc, EmfType.EmfPlusOnly);
337
mf = new
Metafile
(hdc, EmfType.EmfPlusOnly);
System\Drawing\GraphicsTests.cs (1)
285
using Metafile image =
new
(Helpers.GetTestBitmapPath("telescope_01.wmf"));
System\Drawing\Imaging\MetafileTests.cs (124)
40
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(IntPtr.Zero, false));
46
using Metafile metafile =
new
(GetPath(WmfFile));
47
Assert.Throws<ExternalException>(() => new
Metafile
(metafile.GetHenhmetafile(), false));
53
using Metafile metafile =
new
(GetPath(WmfFile));
60
Assert.Throws<ExternalException>(() => new
Metafile
(GetPath(BmpFile)));
66
AssertExtensions.Throws<ArgumentNullException>("path", () => new
Metafile
((string)null));
72
Assert.Throws<ExternalException>(() => new
Metafile
("fileNotExist"));
87
AssertExtensions.Throws<ArgumentException>("path", null, () => new
Metafile
(path));
94
using Metafile metafile =
new
(stream);
101
AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new
Metafile
((Stream)null));
108
Assert.Throws<ExternalException>(() => new
Metafile
(stream));
124
using Metafile metafile =
new
(g.GetHdc(), emfType);
143
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(g.GetHdc(), emfType));
149
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
((IntPtr)null, EmfType.EmfOnly));
155
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(IntPtr.Zero, EmfType.EmfOnly));
170
using Metafile metafile =
new
(g.GetHdc(), EmfType.EmfOnly, description);
178
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(IntPtr.Zero, EmfType.EmfOnly, description));
186
using Metafile metafile =
new
(g.GetHdc(), _rectangleF);
206
using Metafile metafile =
new
(g.GetHdc(), _rectangleF, frameUnit);
216
using Metafile metafile =
new
(g.GetHdc(), _rectangleF, MetafileFrameUnit.Pixel, emfType);
227
using Metafile metafile =
new
(g.GetHdc(), _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly, description);
236
using Metafile metafile =
new
(g.GetHdc(), _rectangle);
246
using Metafile metafile =
new
(g.GetHdc(), _rectangle, frameUnit);
256
using Metafile metafile =
new
(g.GetHdc(), _rectangle, MetafileFrameUnit.Pixel, emfType);
267
using Metafile metafile =
new
(g.GetHdc(), _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly, description);
274
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(IntPtr.Zero, _rectangleF));
275
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel));
277
new
Metafile
(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly));
279
new
Metafile
(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly, "description"));
281
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(IntPtr.Zero, _rectangle));
282
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel));
284
new
Metafile
(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly));
286
new
Metafile
(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly, "description"));
304
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(referenceHdc, _rectangleF, farameUnit));
305
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(referenceHdc, _rectangleF, farameUnit, EmfType.EmfOnly));
307
new
Metafile
(referenceHdc, _rectangleF, farameUnit, EmfType.EmfOnly, "description"));
309
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(referenceHdc, _rectangle, farameUnit));
310
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(referenceHdc, _rectangle, farameUnit, EmfType.EmfOnly));
312
new
Metafile
(referenceHdc, _rectangle, farameUnit, EmfType.EmfOnly, "description"));
323
new
Metafile
(referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, emfType));
325
new
Metafile
(referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, emfType, "description"));
328
new
Metafile
(referenceHdc, _rectangle, MetafileFrameUnit.GdiCompatible, emfType));
330
new
Metafile
(referenceHdc, _rectangle, MetafileFrameUnit.GdiCompatible, emfType, "description"));
339
using (Metafile metafile =
new
(fileName, g.GetHdc()))
355
using (Metafile metafile =
new
(fileName, g.GetHdc(), emfType))
372
using (Metafile metafile =
new
(fileName, g.GetHdc(), EmfType.EmfPlusDual, description))
386
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, IntPtr.Zero));
387
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, IntPtr.Zero, EmfType.EmfOnly));
388
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, IntPtr.Zero, EmfType.EmfOnly, "description"));
400
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, referenceHdc, emfType));
401
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, referenceHdc, emfType, "description"));
411
AssertExtensions.Throws<ArgumentNullException>("path", () => new
Metafile
((string)null, referenceHdc));
412
AssertExtensions.Throws<ArgumentNullException>("path", () => new
Metafile
((string)null, referenceHdc, EmfType.EmfOnly));
413
AssertExtensions.Throws<ArgumentNullException>("path", () => new
Metafile
((string)null, referenceHdc, EmfType.EmfOnly, "description"));
424
AssertExtensions.Throws<ArgumentException>("path", null, () => new
Metafile
(fileName, referenceHdc));
425
AssertExtensions.Throws<ArgumentException>("path", null, () => new
Metafile
(fileName, referenceHdc, EmfType.EmfOnly));
426
AssertExtensions.Throws<ArgumentException>("path", null, () => new
Metafile
(fileName, referenceHdc, EmfType.EmfOnly, "description"));
436
Assert.Throws<PathTooLongException>(() => new
Metafile
(fileName, referenceHdc));
437
Assert.Throws<PathTooLongException>(() => new
Metafile
(fileName, referenceHdc, EmfType.EmfOnly));
438
Assert.Throws<PathTooLongException>(() => new
Metafile
(fileName, referenceHdc, EmfType.EmfOnly, "description"));
448
using (Metafile metafile =
new
(fileName, g.GetHdc(), _rectangleF))
464
using (Metafile metafile =
new
(fileName, g.GetHdc(), _rectangleF, frameUnit))
480
using (Metafile metafile =
new
(fileName, g.GetHdc(), _rectangleF, MetafileFrameUnit.GdiCompatible, emfType))
497
using (Metafile metafile =
new
(
515
using (Metafile metafile =
new
(
532
using (Metafile metafile =
new
(fileName, g.GetHdc(), _rectangle))
548
using (Metafile metafile =
new
(fileName, g.GetHdc(), _rectangle, frameUnit))
564
using (Metafile metafile =
new
(fileName, g.GetHdc(), _rectangle, MetafileFrameUnit.GdiCompatible, emfType))
581
using (Metafile metafile =
new
(
599
using (Metafile metafile =
new
(
614
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, IntPtr.Zero, _rectangleF));
615
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible));
617
new
Metafile
(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly));
619
new
Metafile
(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description"));
621
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, IntPtr.Zero, _rectangle));
622
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible));
624
new
Metafile
(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly));
626
new
Metafile
(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description"));
638
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, referenceHdc, _rectangleF, frameUnit));
640
new
Metafile
(fileName, referenceHdc, _rectangleF, frameUnit, EmfType.EmfOnly));
642
new
Metafile
(fileName, referenceHdc, _rectangleF, frameUnit, EmfType.EmfOnly, "description"));
644
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(fileName, referenceHdc, _rectangle, frameUnit));
646
new
Metafile
(fileName, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly));
648
new
Metafile
(fileName, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly, "description"));
661
new
Metafile
(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, emfType));
663
new
Metafile
(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, emfType, "description"));
666
new
Metafile
(fileName, referenceHdc, _rectangle, MetafileFrameUnit.GdiCompatible, emfType));
668
new
Metafile
(fileName, referenceHdc, _rectangle, MetafileFrameUnit.GdiCompatible, emfType, "description"));
678
AssertExtensions.Throws<ArgumentNullException>("path", () => new
Metafile
((string)null, referenceHdc, _rectangleF));
680
new
Metafile
((string)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible));
682
new
Metafile
((string)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly));
684
new
Metafile
((string)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description"));
695
AssertExtensions.Throws<ArgumentException, ArgumentException>("path", null, () => new
Metafile
(fileName, referenceHdc, _rectangleF));
697
new
Metafile
(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible));
699
new
Metafile
(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly));
701
new
Metafile
(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description"));
711
Assert.Throws<PathTooLongException>(() => new
Metafile
(fileName, referenceHdc, _rectangleF));
713
new
Metafile
(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible));
715
new
Metafile
(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly));
717
new
Metafile
(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description"));
727
using Metafile metafile =
new
(stream, g.GetHdc(), _rectangle);
738
using Metafile metafile =
new
(stream, g.GetHdc(), _rectangle, frameUnit);
749
using Metafile metafile =
new
(stream, g.GetHdc(), _rectangle, MetafileFrameUnit.GdiCompatible, emfType);
761
using Metafile metafile =
new
(
774
using Metafile metafile =
new
(
784
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(stream, IntPtr.Zero, _rectangle));
785
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible));
787
new
Metafile
(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly));
789
new
Metafile
(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description"));
800
AssertExtensions.Throws<ArgumentException>(null, () => new
Metafile
(stream, referenceHdc, _rectangle, frameUnit));
802
new
Metafile
(stream, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly));
804
new
Metafile
(stream, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly, "description"));
816
new
Metafile
(stream, referenceHdc, _rectangle, MetafileFrameUnit.GdiCompatible, emfType));
818
new
Metafile
(stream, referenceHdc, _rectangle, MetafileFrameUnit.GdiCompatible, emfType, "description"));
827
Assert.Throws<ArgumentNullException>(() => new
Metafile
((Stream)null, referenceHdc, _rectangleF));
828
Assert.Throws<ArgumentNullException>(() => new
Metafile
((Stream)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible));
830
new
Metafile
((Stream)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly));
832
new
Metafile
((Stream)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description"));
846
using Metafile metafile =
new
(GetPath(WmfFile));
888
using Metafile metafile =
new
(GetPath(WmfFile));
898
Metafile metafile =
new
(GetPath(WmfFile));
907
using Metafile metafile =
new
(GetPath(WmfFile));
914
Metafile metafile =
new
(GetPath(WmfFile));
923
Metafile metafile =
new
(GetPath(WmfFile));
System\Drawing\TextureBrushTests.cs (1)
14
yield return new object[] { new
Metafile
(Helpers.GetTestBitmapPath("telescope_01.wmf")), PixelFormat.Format32bppArgb, new Size(490, 654) };
System.Windows.Forms.Design (1)
System\Drawing\Design\MetafileEditor.cs (1)
18
protected override Image LoadFromStream(Stream stream) => new
Metafile
(stream);
System.Windows.Forms.Tests (29)
System\Windows\Forms\AxHostTests.cs (4)
1632
Metafile original =
new
("bitmaps/milkmateya01.emf");
1654
Metafile original =
new
("bitmaps/telescope_01.wmf");
1697
Metafile original =
new
("bitmaps/milkmateya01.emf");
1722
Metafile original =
new
("bitmaps/telescope_01.wmf");
System\Windows\Forms\ClipboardTests.cs (4)
370
using Metafile metafile =
new
("bitmaps/telescope_01.wmf");
371
using Metafile enhancedMetafile =
new
("bitmaps/milkmateya01.emf");
436
using Metafile metafile =
new
("bitmaps/telescope_01.wmf");
445
using Metafile metafile =
new
("bitmaps/milkmateya01.emf");
System\Windows\Forms\ControlPaintTests.cs (7)
1316
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf"), -10, -20, Color.Red };
1317
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf"), 0, 0, Color.Red };
1318
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf"), 1, 2, Color.Red };
1319
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf"), 0, 0, Color.Black };
1320
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf"), 0, 0, Color.White };
1321
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf"), 0, 0, Color.Transparent };
1322
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf"), 0, 0, Color.Empty };
System\Windows\Forms\DataObjectTests.cs (1)
1568
using var metafile = new Drawing.Imaging.
Metafile
("bitmaps/milkmateya01.emf");
System\Windows\Forms\ImageList.ImageCollectionTests.cs (11)
339
using Metafile value =
new
("bitmaps/telescope_01.wmf");
806
using Metafile value =
new
("bitmaps/telescope_01.wmf");
883
using Metafile value =
new
("bitmaps/telescope_01.wmf");
1058
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf") };
1272
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf") };
1288
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf") };
1723
using Metafile value =
new
("bitmaps/telescope_01.wmf");
1730
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf") };
1761
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf") };
1796
yield return new object[] { index, new
Metafile
("bitmaps/telescope_01.wmf") };
1813
yield return new object[] { new
Metafile
("bitmaps/telescope_01.wmf") };
System\Windows\Forms\TextRendererTests.cs (2)
753
using (Metafile metafileRecorder =
new
(stream, hdc.HDC, EmfType.EmfOnly))
777
using Metafile metafile =
new
(stream);
140 references to Metafile
PresentationFramework-SystemDrawing (5)
SystemDrawingExtension.cs (5)
40
return data is
Metafile
;
47
Metafile
metafile = data as
Metafile
;
100
Metafile
metafile = new Metafile(handle, false);
129
Metafile
metafile = new Metafile(metafileStream);
System.Drawing (1)
System.Drawing.cs (1)
92
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Imaging.
Metafile
))]
System.Drawing.Common (36)
Special\NotSupported.cs (36)
549
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
550
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
551
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
552
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point destPoint, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
553
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point destPoint, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
554
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point destPoint, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
555
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
556
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
557
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
558
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF destPoint, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
559
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF destPoint, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
560
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF destPoint, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
561
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
562
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
563
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
564
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
565
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
566
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
567
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
568
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
569
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
570
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
571
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
572
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
573
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
574
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
575
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
576
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
577
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
578
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
579
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
580
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
581
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
582
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.RectangleF destRect, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
583
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.RectangleF destRect, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
584
public void EnumerateMetafile(System.Drawing.Imaging.
Metafile
metafile, System.Drawing.RectangleF destRect, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, System.IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (71)
mono\System.Imaging\MetafileTest.cs (15)
46
using
Metafile
mf = new(filename);
47
using
Metafile
clone = (
Metafile
)mf.Clone();
94
using
Metafile
mf = new(Helpers.GetTestBitmapPath(WmfPlaceable));
109
using
Metafile
mf = new(fs);
125
using
Metafile
mf = new(ms);
161
using
Metafile
mf = new(Helpers.GetTestBitmapPath(Emf));
170
using
Metafile
mf = new(fs);
180
using
Metafile
mf = new(ms);
188
private void CheckEmptyHeader(
Metafile
mf, EmfType type)
221
Metafile
mf = new(hdc, new Rectangle());
238
Metafile
mf = new(hdc, new RectangleF());
254
Metafile
mf = new(stream, hdc, type);
288
Metafile
mf;
330
Metafile
mf;
System\Drawing\GraphicsTests.cs (1)
285
using
Metafile
image = new(Helpers.GetTestBitmapPath("telescope_01.wmf"));
System\Drawing\IconConverterTests.cs (4)
48
Assert.False(_icoConv.CanConvertFrom(null, typeof(
Metafile
)), "Metafile");
61
Assert.False(_icoConvFrmTD.CanConvertFrom(null, typeof(
Metafile
)), "TD Metafile");
148
Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture, _icon, typeof(
Metafile
)));
165
Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _icon, typeof(
Metafile
)));
System\Drawing\ImageConverterTests.cs (4)
74
Assert.False(_imgConv.CanConvertFrom(null, typeof(
Metafile
)), "Mefafile");
87
Assert.False(_imgConvFrmTD.CanConvertFrom(null, typeof(
Metafile
)), "TD Metafile");
202
Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(
Metafile
)));
211
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(
Metafile
)));
System\Drawing\Imaging\MetafileTests.cs (47)
46
using
Metafile
metafile = new(GetPath(WmfFile));
53
using
Metafile
metafile = new(GetPath(WmfFile));
94
using
Metafile
metafile = new(stream);
124
using
Metafile
metafile = new(g.GetHdc(), emfType);
170
using
Metafile
metafile = new(g.GetHdc(), EmfType.EmfOnly, description);
186
using
Metafile
metafile = new(g.GetHdc(), _rectangleF);
206
using
Metafile
metafile = new(g.GetHdc(), _rectangleF, frameUnit);
216
using
Metafile
metafile = new(g.GetHdc(), _rectangleF, MetafileFrameUnit.Pixel, emfType);
227
using
Metafile
metafile = new(g.GetHdc(), _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly, description);
236
using
Metafile
metafile = new(g.GetHdc(), _rectangle);
246
using
Metafile
metafile = new(g.GetHdc(), _rectangle, frameUnit);
256
using
Metafile
metafile = new(g.GetHdc(), _rectangle, MetafileFrameUnit.Pixel, emfType);
267
using
Metafile
metafile = new(g.GetHdc(), _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly, description);
339
using (
Metafile
metafile = new(fileName, g.GetHdc()))
355
using (
Metafile
metafile = new(fileName, g.GetHdc(), emfType))
372
using (
Metafile
metafile = new(fileName, g.GetHdc(), EmfType.EmfPlusDual, description))
448
using (
Metafile
metafile = new(fileName, g.GetHdc(), _rectangleF))
464
using (
Metafile
metafile = new(fileName, g.GetHdc(), _rectangleF, frameUnit))
480
using (
Metafile
metafile = new(fileName, g.GetHdc(), _rectangleF, MetafileFrameUnit.GdiCompatible, emfType))
497
using (
Metafile
metafile = new(
515
using (
Metafile
metafile = new(
532
using (
Metafile
metafile = new(fileName, g.GetHdc(), _rectangle))
548
using (
Metafile
metafile = new(fileName, g.GetHdc(), _rectangle, frameUnit))
564
using (
Metafile
metafile = new(fileName, g.GetHdc(), _rectangle, MetafileFrameUnit.GdiCompatible, emfType))
581
using (
Metafile
metafile = new(
599
using (
Metafile
metafile = new(
727
using
Metafile
metafile = new(stream, g.GetHdc(), _rectangle);
738
using
Metafile
metafile = new(stream, g.GetHdc(), _rectangle, frameUnit);
749
using
Metafile
metafile = new(stream, g.GetHdc(), _rectangle, MetafileFrameUnit.GdiCompatible, emfType);
761
using
Metafile
metafile = new(
774
using
Metafile
metafile = new(
838
MetafileHeader header =
Metafile
.GetMetafileHeader(GetPath(WmfFile));
845
AssertExtensions.Throws<ArgumentException>(null, () =>
Metafile
.GetMetafileHeader(IntPtr.Zero));
846
using
Metafile
metafile = new(GetPath(WmfFile));
847
AssertExtensions.Throws<ArgumentException>(null, () =>
Metafile
.GetMetafileHeader(metafile.GetHenhmetafile()));
855
AssertExtensions.Throws<ArgumentException>("path", null, () =>
Metafile
.GetMetafileHeader(fileName));
861
AssertExtensions.Throws<ArgumentNullException>("path", () =>
Metafile
.GetMetafileHeader((string)null));
868
MetafileHeader header =
Metafile
.GetMetafileHeader(stream);
875
Assert.Throws<ArgumentNullException>(() =>
Metafile
.GetMetafileHeader((Stream)null));
882
AssertExtensions.Throws<ArgumentException>(null, () =>
Metafile
.GetMetafileHeader(stream));
888
using
Metafile
metafile = new(GetPath(WmfFile));
898
Metafile
metafile = new(GetPath(WmfFile));
907
using
Metafile
metafile = new(GetPath(WmfFile));
914
Metafile
metafile = new(GetPath(WmfFile));
923
Metafile
metafile = new(GetPath(WmfFile));
959
private void AssertMetafileIsBlank(
Metafile
metafile)
979
private void AssertMetafile(
Metafile
metafile)
System.Windows.Forms (3)
System\Drawing\Design\UITypeEditor.cs (1)
59
[typeof(
Metafile
)] = $"System.Drawing.Design.MetafileEditor, {AssemblyRef.SystemDrawingDesign}",
System\Windows\Forms\Control.cs (1)
4793
/// or <see cref="Drawing.Imaging.
Metafile
"/>) or some <see cref="object"/> that implements
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
2145
/// either be a base managed class (<see cref="string"/>, <see cref="Bitmap"/>, or <see cref="
Metafile
"/>)
System.Windows.Forms.Design.Tests (3)
EnsureEditorsTests.cs (1)
53
[InlineData(typeof(
Metafile
), typeof(MetafileEditor))]
System\Drawing\Design\MetafileEditorTests.cs (2)
68
Metafile
result = Assert.IsType<
Metafile
>(editor.LoadFromStream(stream));
System.Windows.Forms.Primitives (2)
System\Drawing\ImageExtensions.cs (2)
35
using (
Metafile
metafile = new((HMETAFILE)handle, header, deleteWmf: false))
41
using (
Metafile
metafile = new((HENHMETAFILE)handle, deleteEmf: false))
System.Windows.Forms.Tests (19)
System\Windows\Forms\AxHostTests.cs (8)
1632
Metafile
original = new("bitmaps/milkmateya01.emf");
1647
var
result = Assert.IsType<
Metafile
>(SubAxHost.GetPictureFromIPictureDisp(disp));
1654
Metafile
original = new("bitmaps/telescope_01.wmf");
1697
Metafile
original = new("bitmaps/milkmateya01.emf");
1715
var
result = Assert.IsType<
Metafile
>(SubAxHost.GetPictureFromIPicture(iPicture));
1722
Metafile
original = new("bitmaps/telescope_01.wmf");
System\Windows\Forms\ClipboardTests.cs (4)
370
using
Metafile
metafile = new("bitmaps/telescope_01.wmf");
371
using
Metafile
enhancedMetafile = new("bitmaps/milkmateya01.emf");
436
using
Metafile
metafile = new("bitmaps/telescope_01.wmf");
445
using
Metafile
metafile = new("bitmaps/milkmateya01.emf");
System\Windows\Forms\DataObjectTests.cs (1)
1568
using
var
metafile = new Drawing.Imaging.Metafile("bitmaps/milkmateya01.emf");
System\Windows\Forms\ImageList.ImageCollectionTests.cs (4)
339
using
Metafile
value = new("bitmaps/telescope_01.wmf");
806
using
Metafile
value = new("bitmaps/telescope_01.wmf");
883
using
Metafile
value = new("bitmaps/telescope_01.wmf");
1723
using
Metafile
value = new("bitmaps/telescope_01.wmf");
System\Windows\Forms\TextRendererTests.cs (2)
753
using (
Metafile
metafileRecorder = new(stream, hdc.HDC, EmfType.EmfOnly))
777
using
Metafile
metafile = new(stream);