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