122 references to EmfType
System.Drawing (1)
System.Drawing.cs (1)
79[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Imaging.EmfType))]
System.Drawing.Common (29)
System\Drawing\Imaging\Metafile.cs (28)
83public Metafile(IntPtr referenceHdc, EmfType emfType) : 102this(referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual) 110public Metafile(IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type) : 119public Metafile(IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type, string? description) 143this(referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual) 151public Metafile(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type) : 160this(fileName, referenceHdc, EmfType.EmfPlusDual, null) 167public Metafile(string fileName, IntPtr referenceHdc, EmfType type) : 184this(fileName, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual) 191public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type) : 200this(fileName, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual, desc) 207public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type, string? description) 246this(fileName, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual) 253public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type) : 262this(fileName, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual, description) 270this(stream, referenceHdc, EmfType.EmfPlusDual, null) 277public Metafile(Stream stream, IntPtr referenceHdc, EmfType type) : 294this(stream, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual) 301public Metafile(Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type) : 318this(stream, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual) 325public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type) : 355public Metafile(IntPtr referenceHdc, EmfType emfType, string? description) 376public Metafile(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string? desc) 399public Metafile(string fileName, IntPtr referenceHdc, EmfType type, string? description) 424public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string? description) 450public unsafe Metafile(Stream stream, IntPtr referenceHdc, EmfType type, string? description) 474public unsafe Metafile(Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type, string? description) 499public unsafe Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string? description)
System\Drawing\Printing\PreviewPrintController.cs (1)
69Imaging.EmfType.EmfPlusOnly);
System.Drawing.Common.Tests (91)
mono\System.Imaging\MetafileTest.cs (12)
188private static void CheckEmptyHeader(Metafile mf, EmfType type) 198case EmfType.EmfOnly: 201case EmfType.EmfPlusDual: 204case EmfType.EmfPlusOnly: 222CheckEmptyHeader(mf, EmfType.EmfPlusDual); 239CheckEmptyHeader(mf, EmfType.EmfPlusDual); 247private void Metafile_StreamEmfType(Stream stream, EmfType type) 266Assert.Throws<ArgumentNullException>(() => Metafile_StreamEmfType(null, EmfType.EmfOnly)); 273Metafile_StreamEmfType(ms, EmfType.EmfOnly); 280Assert.Throws<ArgumentException>(() => Metafile_StreamEmfType(ms, (EmfType)int.MinValue)); 295mf = new Metafile(hdc, EmfType.EmfPlusOnly); 337mf = new Metafile(hdc, EmfType.EmfPlusOnly);
System\Drawing\Imaging\MetafileTests.cs (79)
116yield return new object[] { EmfType.EmfOnly }; 117yield return new object[] { EmfType.EmfPlusDual }; 118yield return new object[] { EmfType.EmfPlusOnly }; 123public void Ctor_IntPtrEmfType_Success(EmfType emfType) 134yield return new object[] { (EmfType.EmfOnly - 1) }; 135yield return new object[] { (EmfType.EmfPlusDual + 1) }; 136yield return new object[] { (EmfType)int.MaxValue }; 137yield return new object[] { (EmfType)int.MinValue }; 142public void Ctor_IntPtrInvalidEmfType_ThrowsArgumentException(EmfType emfType) 152AssertExtensions.Throws<ArgumentException>(null, () => new Metafile((IntPtr)null, EmfType.EmfOnly)); 158AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly)); 173using Metafile metafile = new(g.GetHdc(), EmfType.EmfOnly, description); 181AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly, description)); 215public void Ctor_IntPtrRectangleFMetafileFrameUnitEmfType_Success(EmfType emfType) 230using Metafile metafile = new(g.GetHdc(), _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly, description); 255public void Ctor_IntPtrRectangleMetafileFrameUnitEmfType_Success(EmfType emfType) 270using Metafile metafile = new(g.GetHdc(), _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly, description); 280new Metafile(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly)); 282new Metafile(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly, "description")); 287new Metafile(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly)); 289new Metafile(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly, "description")); 308AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangleF, farameUnit, EmfType.EmfOnly)); 310new Metafile(referenceHdc, _rectangleF, farameUnit, EmfType.EmfOnly, "description")); 313AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangle, farameUnit, EmfType.EmfOnly)); 315new Metafile(referenceHdc, _rectangle, farameUnit, EmfType.EmfOnly, "description")); 320public void Ctor_InvalidEmfType_ThrowsArgumentException(EmfType emfType) 353public void Ctor_StringIntPtrEmfType_Success(EmfType emfType) 375using (Metafile metafile = new(fileName, g.GetHdc(), EmfType.EmfPlusDual, description)) 378AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfPlusDual); 390AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly)); 391AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly, "description")); 397public void Ctor_InvalidEmfTypeI_ThrowsArgumentException(EmfType emfType) 415AssertExtensions.Throws<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc, EmfType.EmfOnly)); 416AssertExtensions.Throws<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc, EmfType.EmfOnly, "description")); 428AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, EmfType.EmfOnly)); 429AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, EmfType.EmfOnly, "description")); 440Assert.Throws<PathTooLongException>(() => new Metafile(fileName, referenceHdc, EmfType.EmfOnly)); 441Assert.Throws<PathTooLongException>(() => new Metafile(fileName, referenceHdc, EmfType.EmfOnly, "description")); 478public void Ctor_StringIntPtrRectangleFMetafileFrameUnitEmfType_Success(EmfType emfType) 501fileName, g.GetHdc(), _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description)) 504AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 519fileName, g.GetHdc(), default(RectangleF), MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description)) 522AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 562public void Ctor_StringIntPtrRectangleMetafileFrameUnitEmfType_Success(EmfType emfType) 585fileName, g.GetHdc(), _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description)) 588AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 603fileName, g.GetHdc(), default, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description)) 606AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 620new Metafile(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 622new Metafile(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 627new Metafile(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 629new Metafile(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 643new Metafile(fileName, referenceHdc, _rectangleF, frameUnit, EmfType.EmfOnly)); 645new Metafile(fileName, referenceHdc, _rectangleF, frameUnit, EmfType.EmfOnly, "description")); 649new Metafile(fileName, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly)); 651new Metafile(fileName, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly, "description")); 657public void Ctor_InvalidEmfTypeII_ThrowsArgumentException(EmfType emfType) 685new Metafile((string)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 687new Metafile((string)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 702new Metafile(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 704new Metafile(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 718new Metafile(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 720new Metafile(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 747public void Ctor_StreamIntPtrRectangleMetafileFrameUnitEmfType_Success(EmfType emfType) 765stream, g.GetHdc(), _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description); 767AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 778stream, g.GetHdc(), default, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description); 780AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 790new Metafile(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 792new Metafile(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 805new Metafile(stream, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly)); 807new Metafile(stream, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly, "description")); 812public void Ctor_InvalidEmfTypeIII_ThrowsArgumentException(EmfType emfType) 833new Metafile((Stream)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 835new Metafile((Stream)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 946private static void AssertEmfType(MetafileHeader metafileHeader, EmfType emfType) 950case EmfType.EmfOnly: 953case EmfType.EmfPlusDual: 956case EmfType.EmfPlusOnly:
System.Windows.Forms.Tests (1)
System\Windows\Forms\TextRendererTests.cs (1)
755using (Metafile metafileRecorder = new(stream, hdc.HDC, EmfType.EmfOnly))