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