Graphics.EnumerateMetafile Method

Definition

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

Overloads

EnumerateMetafile(Metafile, PointF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

EnumerateMetafile(Metafile, Rectangle, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

EnumerateMetafile(Metafile, Rectangle, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

EnumerateMetafile(Metafile, RectangleF, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

EnumerateMetafile(Metafile, RectangleF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

EnumerateMetafile(Metafile, Point, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

EnumerateMetafile(Metafile, Point[], Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

EnumerateMetafile(Metafile, PointF[], RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

EnumerateMetafile(Metafile, PointF[], RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

EnumerateMetafile(Metafile, RectangleF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

EnumerateMetafile(Metafile, Point, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

EnumerateMetafile(Metafile, Point[], Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

EnumerateMetafile(Metafile, PointF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

EnumerateMetafile(Metafile, PointF[], RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

EnumerateMetafile(Metafile, Rectangle, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

EnumerateMetafile(Metafile, RectangleF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

EnumerateMetafile(Metafile, Rectangle, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

EnumerateMetafile(Metafile, PointF[], Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

EnumerateMetafile(Metafile, Point[], Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

EnumerateMetafile(Metafile, PointF, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

EnumerateMetafile(Metafile, Point[], Graphics+EnumerateMetafileProc)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

EnumerateMetafile(Metafile, PointF, Graphics+EnumerateMetafileProc)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

EnumerateMetafile(Metafile, PointF[], Graphics+EnumerateMetafileProc)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

EnumerateMetafile(Metafile, Rectangle, Graphics+EnumerateMetafileProc)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

EnumerateMetafile(Metafile, RectangleF, Graphics+EnumerateMetafileProc)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc, IntPtr)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

EnumerateMetafile(Metafile, Point[], Graphics+EnumerateMetafileProc, IntPtr)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

EnumerateMetafile(Metafile, PointF, Graphics+EnumerateMetafileProc, IntPtr)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

EnumerateMetafile(Metafile, PointF[], Graphics+EnumerateMetafileProc, IntPtr)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

EnumerateMetafile(Metafile, Rectangle, Graphics+EnumerateMetafileProc, IntPtr)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

EnumerateMetafile(Metafile, RectangleF, Graphics+EnumerateMetafileProc, IntPtr)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

EnumerateMetafile(Metafile, Point, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

EnumerateMetafile(Metafile, PointF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

EnumerateMetafile(Metafile, Point[], Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

EnumerateMetafile(Metafile, PointF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
PointF

PointF structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
RectangleF

RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Rectangle, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
Rectangle

Rectangle structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Rectangle, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
Rectangle

Rectangle structure that specifies the location and size of the drawn metafile.

srcRect
Rectangle

Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, RectangleF, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
RectangleF

RectangleF structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, RectangleF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
RectangleF

RectangleF structure that specifies the location and size of the drawn metafile.

srcRect
RectangleF

RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
Point

Point structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
Rectangle

Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point[], Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
Point[]

Array of three Point structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
Rectangle

Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The destPoints parameter specifies three points of a parallelogram. The three Point structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF[], RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
PointF[]

Array of three PointF structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
RectangleF

RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The destPoints parameter specifies three points of a parallelogram. The three PointF structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF[], RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
PointF[]

Array of three PointF structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
RectangleF

RectangleF structures that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The destPoints parameter specifies three points of a parallelogram. The three Point structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, RectangleF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
RectangleF

RectangleF structure that specifies the location and size of the drawn metafile.

srcRect
RectangleF

RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by thecallback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
Point

Point structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
Rectangle

Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point[], Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
Point[]

Array of three Point structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
Rectangle

Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The destPoints parameter specifies three points of a parallelogram. The three Point structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
PointF

PointF structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
RectangleF

RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF[], RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
PointF[]

Array of three PointF structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
RectangleF

RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The destPoints parameter specifies three points of a parallelogram. The three PointF structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Rectangle, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
Rectangle

Rectangle structure that specifies the location and size of the drawn metafile.

srcRect
Rectangle

Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, RectangleF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit unit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
RectangleF

RectangleF structure that specifies the location and size of the drawn metafile.

srcRect
RectangleF

RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Rectangle, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
Rectangle

Rectangle structure that specifies the location and size of the drawn metafile.

srcRect
Rectangle

Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF[], Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
PointF[]

Array of three PointF structures that define a parallelogram that determines the size and location of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The destPoints parameter specifies three points of a parallelogram. The three PointF structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.

The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point[], Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
Point[]

Array of three Point structures that define a parallelogram that determines the size and location of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The destPoints parameter specifies three points of a parallelogram. The three Point structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.

The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
PointF

PointF structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the method of the specific Metafile that is being enumerated.

The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point[], Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
Point[]

Array of three Point structures that define a parallelogram that determines the size and location of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF, Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
PointF

PointF structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF[], Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
PointF[]

Array of three PointF structures that define a parallelogram that determines the size and location of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The destPoints parameter specifies three points of a parallelogram. The three PointF structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Rectangle, Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
Rectangle

Rectangle structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, RectangleF, Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
RectangleF

RectangleF structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
Point

Point structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile.

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point[], Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
Point[]

Array of three Point structures that define a parallelogram that determines the size and location of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF, Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
PointF

PointF structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF[], Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
PointF[]

Array of three PointF structures that define a parallelogram that determines the size and location of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The destPoints parameter specifies three points of a parallelogram. The three PointF structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Rectangle, Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
Rectangle

Rectangle structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, RectangleF, Graphics+EnumerateMetafileProc, IntPtr)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);

Parameters

metafile
Metafile

Metafile to enumerate.

destRect
RectangleF

RectangleF structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
Point

Point structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

Internal pointer that is required, but ignored. You can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes that specifies image attribute information for the drawn image.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
Point

Point structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
Rectangle

Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, PointF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
PointF

PointF structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
RectangleF

RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point[], Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoints
Point[]

Array of three Point structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
Rectangle

Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

Member of the GraphicsUnit enumeration that specifies the unit of measure used to determine the portion of the metafile that the rectangle specified by the srcRect parameter contains.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

The destPoints parameter specifies three points of a parallelogram. The three Point structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.

Any drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

C#
public void EnumerateMetafile(System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback);

Parameters

metafile
Metafile

Metafile to enumerate.

destPoint
Point

Point structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

Examples

The following code example creates a form that has a Metafile as one of its private members. The OnPaint method calls EnumerateMetafile, which calls the form's MetafileCallback method for each record in the metafile. The MetafileCallback method calls the PlayRecord method. Notice that the MetafileCallback method receives the record data as an IntPtr, but the PlayRecord method expects the record data to be a byte array. The call to Copy copies the record data to a byte array so that it can be passed to PlayRecord.

C#

using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;

// for Marshal.Copy
using System.Runtime.InteropServices; 

public class Form1 : Form
{
    private Metafile metafile1;
    private Graphics.EnumerateMetafileProc metafileDelegate;
    private Point destPoint;
    public Form1()
    {
        metafile1 = new Metafile(@"C:\Test.wmf");
        metafileDelegate = new Graphics.EnumerateMetafileProc(MetafileCallback);
        destPoint = new Point(20, 10);
    }
    protected override void OnPaint(PaintEventArgs e)
    {
        e.Graphics.EnumerateMetafile(metafile1, destPoint, metafileDelegate);
    }
    private bool MetafileCallback(
       EmfPlusRecordType recordType,
       int flags,
       int dataSize,
       IntPtr data,
       PlayRecordCallback callbackData)
    {
        byte[] dataArray = null;
        if (data != IntPtr.Zero)
        {
            // Copy the unmanaged record to a managed byte buffer 
            // that can be used by PlayRecord.
            dataArray = new byte[dataSize];
            Marshal.Copy(data, dataArray, 0, dataSize);
        }

        metafile1.PlayRecord(recordType, flags, dataSize, dataArray);

        return true;
    }

    static void Main()
    {
        Application.Run(new Form1());
    }
}

Remarks

This method enumerates the records contained in the specified metafile. Each record is individually sent to a callback method specified by the callback parameter. Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

If the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

See also

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9