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)
70Imaging.EmfType.EmfPlusOnly);
System.Drawing.Common.Tests (91)
mono\System.Imaging\MetafileTest.cs (12)
188private 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)
113yield return new object[] { EmfType.EmfOnly }; 114yield return new object[] { EmfType.EmfPlusDual }; 115yield return new object[] { EmfType.EmfPlusOnly }; 120public void Ctor_IntPtrEmfType_Success(EmfType emfType) 131yield return new object[] { (EmfType.EmfOnly - 1) }; 132yield return new object[] { (EmfType.EmfPlusDual + 1) }; 133yield return new object[] { (EmfType)int.MaxValue }; 134yield return new object[] { (EmfType)int.MinValue }; 139public void Ctor_IntPtrInvalidEmfType_ThrowsArgumentException(EmfType emfType) 149AssertExtensions.Throws<ArgumentException>(null, () => new Metafile((IntPtr)null, EmfType.EmfOnly)); 155AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly)); 170using Metafile metafile = new(g.GetHdc(), EmfType.EmfOnly, description); 178AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly, description)); 212public void Ctor_IntPtrRectangleFMetafileFrameUnitEmfType_Success(EmfType emfType) 227using Metafile metafile = new(g.GetHdc(), _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly, description); 252public void Ctor_IntPtrRectangleMetafileFrameUnitEmfType_Success(EmfType emfType) 267using Metafile metafile = new(g.GetHdc(), _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly, description); 277new Metafile(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly)); 279new Metafile(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly, "description")); 284new Metafile(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly)); 286new Metafile(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly, "description")); 305AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangleF, farameUnit, EmfType.EmfOnly)); 307new Metafile(referenceHdc, _rectangleF, farameUnit, EmfType.EmfOnly, "description")); 310AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangle, farameUnit, EmfType.EmfOnly)); 312new Metafile(referenceHdc, _rectangle, farameUnit, EmfType.EmfOnly, "description")); 317public void Ctor_InvalidEmfType_ThrowsArgumentException(EmfType emfType) 350public void Ctor_StringIntPtrEmfType_Success(EmfType emfType) 372using (Metafile metafile = new(fileName, g.GetHdc(), EmfType.EmfPlusDual, description)) 375AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfPlusDual); 387AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly)); 388AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly, "description")); 394public void Ctor_InvalidEmfTypeI_ThrowsArgumentException(EmfType emfType) 412AssertExtensions.Throws<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc, EmfType.EmfOnly)); 413AssertExtensions.Throws<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc, EmfType.EmfOnly, "description")); 425AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, EmfType.EmfOnly)); 426AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, EmfType.EmfOnly, "description")); 437Assert.Throws<PathTooLongException>(() => new Metafile(fileName, referenceHdc, EmfType.EmfOnly)); 438Assert.Throws<PathTooLongException>(() => new Metafile(fileName, referenceHdc, EmfType.EmfOnly, "description")); 475public void Ctor_StringIntPtrRectangleFMetafileFrameUnitEmfType_Success(EmfType emfType) 498fileName, g.GetHdc(), _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description)) 501AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 516fileName, g.GetHdc(), new RectangleF(), MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description)) 519AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 559public void Ctor_StringIntPtrRectangleMetafileFrameUnitEmfType_Success(EmfType emfType) 582fileName, g.GetHdc(), _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description)) 585AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 600fileName, g.GetHdc(), new Rectangle(), MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description)) 603AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 617new Metafile(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 619new Metafile(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 624new Metafile(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 626new Metafile(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 640new Metafile(fileName, referenceHdc, _rectangleF, frameUnit, EmfType.EmfOnly)); 642new Metafile(fileName, referenceHdc, _rectangleF, frameUnit, EmfType.EmfOnly, "description")); 646new Metafile(fileName, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly)); 648new Metafile(fileName, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly, "description")); 654public void Ctor_InvalidEmfTypeII_ThrowsArgumentException(EmfType emfType) 682new Metafile((string)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 684new Metafile((string)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 699new Metafile(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 701new Metafile(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 715new Metafile(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 717new Metafile(fileName, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 744public void Ctor_StreamIntPtrRectangleMetafileFrameUnitEmfType_Success(EmfType emfType) 762stream, g.GetHdc(), _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description); 764AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 775stream, g.GetHdc(), new Rectangle(), MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description); 777AssertEmfType(metafile.GetMetafileHeader(), EmfType.EmfOnly); 787new Metafile(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 789new Metafile(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 802new Metafile(stream, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly)); 804new Metafile(stream, referenceHdc, _rectangle, frameUnit, EmfType.EmfOnly, "description")); 809public void Ctor_InvalidEmfTypeIII_ThrowsArgumentException(EmfType emfType) 830new Metafile((Stream)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 832new Metafile((Stream)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 943private void AssertEmfType(MetafileHeader metafileHeader, EmfType emfType) 947case EmfType.EmfOnly: 950case EmfType.EmfPlusDual: 953case EmfType.EmfPlusOnly:
System.Windows.Forms.Tests (1)
System\Windows\Forms\TextRendererTests.cs (1)
753using (Metafile metafileRecorder = new(stream, hdc.HDC, EmfType.EmfOnly))