Edit

Share via


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

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

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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF * System.Drawing.RectangleF * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As PointF, srcRect As RectangleF, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::Rectangle destRect, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData, System::Drawing::Imaging::ImageAttributes ^ imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Rectangle * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As Rectangle, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Rectangle * System.Drawing.Rectangle * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As Rectangle, srcRect As Rectangle, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc)

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::RectangleF destRect, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData, System::Drawing::Imaging::ImageAttributes ^ imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.RectangleF * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As RectangleF, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.RectangleF * System.Drawing.RectangleF * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As RectangleF, srcRect As RectangleF, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc)

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

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

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.

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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point * System.Drawing.Rectangle * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As Point, srcRect As Rectangle, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::Point> ^ destPoints, System::Drawing::Rectangle srcRect, System::Drawing::GraphicsUnit srcUnit, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point[] * System.Drawing.Rectangle * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As Point(), srcRect As Rectangle, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::PointF> ^ destPoints, System::Drawing::RectangleF srcRect, System::Drawing::GraphicsUnit srcUnit, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF[] * System.Drawing.RectangleF * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As PointF(), srcRect As RectangleF, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::PointF> ^ destPoints, System::Drawing::RectangleF srcRect, System::Drawing::GraphicsUnit srcUnit, System::Drawing::Graphics::EnumerateMetafileProc ^ callback);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF[] * System.Drawing.RectangleF * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As PointF(), srcRect As RectangleF, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc)

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

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

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.

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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.RectangleF * System.Drawing.RectangleF * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As RectangleF, srcRect As RectangleF, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

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);
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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point * System.Drawing.Rectangle * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As Point, srcRect As Rectangle, unit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::Point> ^ destPoints, System::Drawing::Rectangle srcRect, System::Drawing::GraphicsUnit unit, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData, System::Drawing::Imaging::ImageAttributes ^ imageAttr);
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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point[] * System.Drawing.Rectangle * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As Point(), srcRect As Rectangle, unit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

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);
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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF * System.Drawing.RectangleF * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As PointF, srcRect As RectangleF, unit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::PointF> ^ destPoints, System::Drawing::RectangleF srcRect, System::Drawing::GraphicsUnit unit, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData, System::Drawing::Imaging::ImageAttributes ^ imageAttr);
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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF[] * System.Drawing.RectangleF * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As PointF(), srcRect As RectangleF, unit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

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);
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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Rectangle * System.Drawing.Rectangle * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As Rectangle, srcRect As Rectangle, unit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

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);
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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.RectangleF * System.Drawing.RectangleF * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As RectangleF, srcRect As RectangleF, unit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Rectangle * System.Drawing.Rectangle * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As Rectangle, srcRect As Rectangle, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::PointF> ^ destPoints, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData, System::Drawing::Imaging::ImageAttributes ^ imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF[] * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As PointF(), callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::Point> ^ destPoints, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData, System::Drawing::Imaging::ImageAttributes ^ imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point[] * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As Point(), callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::PointF destPoint, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData, System::Drawing::Imaging::ImageAttributes ^ imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As PointF, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::Point> ^ destPoints, System::Drawing::Graphics::EnumerateMetafileProc ^ callback);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point[] * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As Point(), callback As Graphics.EnumerateMetafileProc)

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

EnumerateMetafile(Metafile, PointF, Graphics+EnumerateMetafileProc)

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::PointF destPoint, System::Drawing::Graphics::EnumerateMetafileProc ^ callback);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As PointF, callback As Graphics.EnumerateMetafileProc)

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::PointF> ^ destPoints, System::Drawing::Graphics::EnumerateMetafileProc ^ callback);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF[] * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As PointF(), callback As Graphics.EnumerateMetafileProc)

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

EnumerateMetafile(Metafile, Rectangle, Graphics+EnumerateMetafileProc)

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::Rectangle destRect, System::Drawing::Graphics::EnumerateMetafileProc ^ callback);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Rectangle * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As Rectangle, callback As Graphics.EnumerateMetafileProc)

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

EnumerateMetafile(Metafile, RectangleF, Graphics+EnumerateMetafileProc)

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::RectangleF destRect, System::Drawing::Graphics::EnumerateMetafileProc ^ callback);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.RectangleF * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As RectangleF, callback As Graphics.EnumerateMetafileProc)

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::Point destPoint, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As Point, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::Point> ^ destPoints, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Point[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point[] * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As Point(), callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::PointF destPoint, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As PointF, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::PointF> ^ destPoints, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.PointF[] destPoints, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF[] * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As PointF(), callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::Rectangle destRect, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Rectangle destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Rectangle * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As Rectangle, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::RectangleF destRect, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.RectangleF destRect, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.RectangleF * System.Drawing.Graphics.EnumerateMetafileProc * nativeint -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destRect As RectangleF, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr)

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

nativeint

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::Point destPoint, System::Drawing::Graphics::EnumerateMetafileProc ^ callback, IntPtr callbackData, System::Drawing::Imaging::ImageAttributes ^ imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes? imageAttr);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback, IntPtr callbackData, System.Drawing.Imaging.ImageAttributes imageAttr);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point * System.Drawing.Graphics.EnumerateMetafileProc * nativeint * System.Drawing.Imaging.ImageAttributes -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As Point, callback As Graphics.EnumerateMetafileProc, callbackData As IntPtr, imageAttr As ImageAttributes)

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

nativeint

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

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

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.

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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point * System.Drawing.Rectangle * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As Point, srcRect As Rectangle, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc)

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

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

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.

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);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.PointF * System.Drawing.RectangleF * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As PointF, srcRect As RectangleF, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc)

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

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

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, cli::array <System::Drawing::Point> ^ destPoints, System::Drawing::Rectangle srcRect, System::Drawing::GraphicsUnit srcUnit, System::Drawing::Graphics::EnumerateMetafileProc ^ callback);
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);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point[] * System.Drawing.Rectangle * System.Drawing.GraphicsUnit * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoints As Point(), srcRect As Rectangle, srcUnit As GraphicsUnit, callback As Graphics.EnumerateMetafileProc)

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

EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)

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.

public:
 void EnumerateMetafile(System::Drawing::Imaging::Metafile ^ metafile, System::Drawing::Point destPoint, System::Drawing::Graphics::EnumerateMetafileProc ^ callback);
public void EnumerateMetafile (System.Drawing.Imaging.Metafile metafile, System.Drawing.Point destPoint, System.Drawing.Graphics.EnumerateMetafileProc callback);
member this.EnumerateMetafile : System.Drawing.Imaging.Metafile * System.Drawing.Point * System.Drawing.Graphics.EnumerateMetafileProc -> unit
Public Sub EnumerateMetafile (metafile As Metafile, destPoint As Point, callback As Graphics.EnumerateMetafileProc)

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.


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());
    }
}
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.Windows.Forms
' for Marshal.Copy
Imports System.Runtime.InteropServices


Public Class Form1
    Inherits Form
    Private metafile1 As Metafile
    Private metafileDelegate As Graphics.EnumerateMetafileProc
    Private destPoint As Point
    
    Public Sub New() 
        metafile1 = New Metafile("C:\test.wmf")
        metafileDelegate = New Graphics.EnumerateMetafileProc(AddressOf MetafileCallback)
        destPoint = New Point(20, 10)
    
    End Sub
    
    Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) 
        e.Graphics.EnumerateMetafile(metafile1, destPoint, metafileDelegate)
    
    End Sub
    
    Private Function MetafileCallback(ByVal recordType As _
        EmfPlusRecordType, ByVal flags As Integer, ByVal dataSize As Integer, _
        ByVal data As IntPtr, ByVal callbackData As PlayRecordCallback) As Boolean

        Dim dataArray As Byte() = Nothing
        If data <> IntPtr.Zero Then

            ' 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)
        End If

        metafile1.PlayRecord(recordType, flags, dataSize, dataArray)
        Return True

    End Function
    
    Shared Sub Main() 
        Application.Run(New Form1())
    End Sub

End Class

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