96 references to MetafileFrameUnit
System.Drawing (1)
System.Drawing.cs (1)
93
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Imaging.
MetafileFrameUnit
))]
System.Drawing.Common (27)
System\Drawing\Imaging\Metafile.cs (26)
76
this(referenceHdc, frameRect,
MetafileFrameUnit
.GdiCompatible)
93
this(referenceHdc, frameRect,
MetafileFrameUnit
.GdiCompatible)
101
public Metafile(IntPtr referenceHdc, RectangleF frameRect,
MetafileFrameUnit
frameUnit) :
110
public Metafile(IntPtr referenceHdc, RectangleF frameRect,
MetafileFrameUnit
frameUnit, EmfType type) :
119
public Metafile(IntPtr referenceHdc, RectangleF frameRect,
MetafileFrameUnit
frameUnit, EmfType type, string? description)
142
public Metafile(IntPtr referenceHdc, Rectangle frameRect,
MetafileFrameUnit
frameUnit) :
151
public Metafile(IntPtr referenceHdc, Rectangle frameRect,
MetafileFrameUnit
frameUnit, EmfType type) :
176
this(fileName, referenceHdc, frameRect,
MetafileFrameUnit
.GdiCompatible)
183
public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect,
MetafileFrameUnit
frameUnit) :
191
public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect,
MetafileFrameUnit
frameUnit, EmfType type) :
199
public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect,
MetafileFrameUnit
frameUnit, string? desc) :
207
public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect,
MetafileFrameUnit
frameUnit, EmfType type, string? description)
238
this(fileName, referenceHdc, frameRect,
MetafileFrameUnit
.GdiCompatible)
245
public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect,
MetafileFrameUnit
frameUnit) :
253
public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect,
MetafileFrameUnit
frameUnit, EmfType type) :
261
public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect,
MetafileFrameUnit
frameUnit, string? description) :
286
this(stream, referenceHdc, frameRect,
MetafileFrameUnit
.GdiCompatible)
293
public Metafile(Stream stream, IntPtr referenceHdc, RectangleF frameRect,
MetafileFrameUnit
frameUnit) :
301
public Metafile(Stream stream, IntPtr referenceHdc, RectangleF frameRect,
MetafileFrameUnit
frameUnit, EmfType type) :
310
this(stream, referenceHdc, frameRect,
MetafileFrameUnit
.GdiCompatible)
317
public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect,
MetafileFrameUnit
frameUnit) :
325
public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect,
MetafileFrameUnit
frameUnit, EmfType type) :
376
public Metafile(IntPtr referenceHdc, Rectangle frameRect,
MetafileFrameUnit
frameUnit, EmfType type, string? desc)
424
public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect,
MetafileFrameUnit
frameUnit, 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.
MetafileFrameUnit
.GdiCompatible,
System.Drawing.Common.Tests (68)
System\Drawing\Imaging\MetafileTests.cs (68)
192
yield return new object[] {
MetafileFrameUnit
.Pixel };
193
yield return new object[] {
MetafileFrameUnit
.Point };
194
yield return new object[] {
MetafileFrameUnit
.Inch };
195
yield return new object[] {
MetafileFrameUnit
.Document };
196
yield return new object[] {
MetafileFrameUnit
.Millimeter };
197
yield return new object[] {
MetafileFrameUnit
.GdiCompatible };
202
public void Ctor_IntPtrRectangleFMetafileFrameUnit_Success(
MetafileFrameUnit
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);
242
public void Ctor_IntPtrRectangleMetafileFrameUnit_Success(
MetafileFrameUnit
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);
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"));
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"));
291
yield return new object[] { (
MetafileFrameUnit
.Pixel - 1) };
292
yield return new object[] { (
MetafileFrameUnit
.GdiCompatible + 1) };
293
yield return new object[] { (
MetafileFrameUnit
)int.MaxValue };
294
yield return new object[] { (
MetafileFrameUnit
)int.MinValue };
299
public void Ctor_InvalidMetafileFrameUnit_ThrowsArgumentException(
MetafileFrameUnit
farameUnit)
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"));
459
public void Ctor_StringIntPtrRectangleFMetafileFrameUnit_Success(
MetafileFrameUnit
frameUnit)
480
using (Metafile metafile = new(fileName, g.GetHdc(), _rectangleF,
MetafileFrameUnit
.GdiCompatible, emfType))
498
fileName, g.GetHdc(), _rectangleF,
MetafileFrameUnit
.GdiCompatible, EmfType.EmfOnly, description))
516
fileName, g.GetHdc(), new RectangleF(),
MetafileFrameUnit
.GdiCompatible, EmfType.EmfOnly, description))
543
public void Ctor_StringIntPtrRectangleMetafileFrameUnit_Success(
MetafileFrameUnit
frameUnit)
564
using (Metafile metafile = new(fileName, g.GetHdc(), _rectangle,
MetafileFrameUnit
.GdiCompatible, emfType))
582
fileName, g.GetHdc(), _rectangle,
MetafileFrameUnit
.GdiCompatible, EmfType.EmfOnly, description))
600
fileName, g.GetHdc(), new Rectangle(),
MetafileFrameUnit
.GdiCompatible, EmfType.EmfOnly, description))
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"));
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"));
632
public void Ctor_InvalidFrameUnit_ThrowsArgumentException(
MetafileFrameUnit
frameUnit)
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"));
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"));
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"));
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"));
733
public void Ctor_StreamIntPtrRectangleMetafileFrameUnit_Success(
MetafileFrameUnit
frameUnit)
749
using Metafile metafile = new(stream, g.GetHdc(), _rectangle,
MetafileFrameUnit
.GdiCompatible, emfType);
762
stream, g.GetHdc(), _rectangle,
MetafileFrameUnit
.GdiCompatible, EmfType.EmfOnly, description);
775
stream, g.GetHdc(), new Rectangle(),
MetafileFrameUnit
.GdiCompatible, EmfType.EmfOnly, description);
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"));
794
public void Ctor_InvalidFrameUnitIII_ThrowsArgumentException(
MetafileFrameUnit
frameUnit)
816
new Metafile(stream, referenceHdc, _rectangle,
MetafileFrameUnit
.GdiCompatible, emfType));
818
new Metafile(stream, referenceHdc, _rectangle,
MetafileFrameUnit
.GdiCompatible, emfType, "description"));
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"));