Graphics.EnumerateMetafile 方法

定义

将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。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)

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。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)

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。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, ImageAttributes)

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。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, RectangleF, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。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, Rectangle, Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。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)

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。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[], Rectangle, GraphicsUnit, Graphics+EnumerateMetafileProc)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。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, Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。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)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。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)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。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)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

EnumerateMetafile(Metafile, RectangleF, Graphics+EnumerateMetafileProc)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。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)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。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)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

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

将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。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)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。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)

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。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[], Graphics+EnumerateMetafileProc, IntPtr, ImageAttributes)

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。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, RectangleF, GraphicsUnit, Graphics+EnumerateMetafileProc)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。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, Graphics+EnumerateMetafileProc, IntPtr)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。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)

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
PointF

PointF 结构,它指定所绘制图元文件的左上角的位置。PointF structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
RectangleF

RectangleF 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
Rectangle

Rectangle 结构,它指定所绘制图元文件的位置和大小。Rectangle structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

由参数指定的图像属性 imageAttr 替换在写入元文件时指定的属性。The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
Rectangle

Rectangle 结构,它指定所绘制图元文件的位置和大小。Rectangle structure that specifies the location and size of the drawn metafile.

srcRect
Rectangle

Rectangle 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
RectangleF

RectangleF 结构,它指定所绘制图元文件的位置和大小。RectangleF structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

由参数指定的图像属性 imageAttr 替换在写入元文件时指定的属性。The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
RectangleF

RectangleF 结构,它指定所绘制图元文件的位置和大小。RectangleF structure that specifies the location and size of the drawn metafile.

srcRect
RectangleF

RectangleF 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
Point

Point 结构,它指定所绘制图元文件的左上角的位置。Point structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
Rectangle

Rectangle 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
Point[]

由三个 Point 结构组成的数组,这三个结构定义一个用来确定所绘制图元文件的大小和位置的平行四边形。Array of three Point structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
Rectangle

Rectangle 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

destPoints参数指定平行四边形的三个点。The destPoints parameter specifies three points of a parallelogram. 这三个 Point 结构表示平行四边形的左上角、右上角和左下角。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.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
PointF[]

由三个 PointF 结构组成的数组,这三个结构定义一个用来确定所绘制图元文件的大小和位置的平行四边形。Array of three PointF structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
RectangleF

RectangleF 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

destPoints参数指定平行四边形的三个点。The destPoints parameter specifies three points of a parallelogram. 这三个 PointF 结构表示平行四边形的左上角、右上角和左下角。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.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
PointF[]

由三个 PointF 结构组成的数组,这三个结构定义一个用来确定所绘制图元文件的大小和位置的平行四边形。Array of three PointF structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
RectangleF

RectangleF 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

destPoints参数指定平行四边形的三个点。The destPoints parameter specifies three points of a parallelogram. 这三个 PointF 结构表示平行四边形的左上角、右上角和左下角。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.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

由参数指定的图像属性 imageAttr 替换在写入元文件时指定的属性。The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
RectangleF

RectangleF 结构,它指定所绘制图元文件的位置和大小。RectangleF structure that specifies the location and size of the drawn metafile.

srcRect
RectangleF

RectangleF 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by thecallback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
Point

Point 结构,它指定所绘制图元文件的左上角的位置。Point structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
Rectangle

Rectangle 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
Point[]

由三个 Point 结构组成的数组,这三个结构定义一个用来确定所绘制图元文件的大小和位置的平行四边形。Array of three Point structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
Rectangle

Rectangle 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

destPoints参数指定平行四边形的三个点。The destPoints parameter specifies three points of a parallelogram. 这三个 Point 结构表示平行四边形的左上角、右上角和左下角。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.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

由参数指定的图像属性 imageAttr 替换在写入元文件时指定的属性。The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
PointF

PointF 结构,它指定所绘制图元文件的左上角的位置。PointF structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
RectangleF

RectangleF 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

由参数指定的图像属性 imageAttr 替换在写入元文件时指定的属性。The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
PointF[]

由三个 PointF 结构组成的数组,这三个结构定义一个用来确定所绘制图元文件的大小和位置的平行四边形。Array of three PointF structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
RectangleF

RectangleF 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。RectangleF structures that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

destPoints参数指定平行四边形的三个点。The destPoints parameter specifies three points of a parallelogram. 这三个 Point 结构表示平行四边形的左上角、右上角和左下角。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.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
Rectangle

Rectangle 结构,它指定所绘制图元文件的位置和大小。Rectangle structure that specifies the location and size of the drawn metafile.

srcRect
Rectangle

Rectangle 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

由参数指定的图像属性 imageAttr 替换在写入元文件时指定的属性。The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
RectangleF

RectangleF 结构,它指定所绘制图元文件的位置和大小。RectangleF structure that specifies the location and size of the drawn metafile.

srcRect
RectangleF

RectangleF 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

unit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

由参数指定的图像属性 imageAttr 替换在写入元文件时指定的属性。The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
Rectangle

Rectangle 结构,它指定所绘制图元文件的位置和大小。Rectangle structure that specifies the location and size of the drawn metafile.

srcRect
Rectangle

Rectangle 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
PointF[]

由三个 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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

destPoints参数指定平行四边形的三个点。The destPoints parameter specifies three points of a parallelogram. 这三个 PointF 结构表示平行四边形的左上角、右上角和左下角。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.

由参数指定的图像属性 imageAttr 替换在写入元文件时指定的属性。The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
Point[]

由三个 Point 结构组成的数组,这三个结构定义一个用来确定所绘制图元文件的大小和位置的平行四边形。Array of three Point structures that define a parallelogram that determines the size and location of the drawn metafile.

srcRect
Rectangle

Rectangle 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

destPoints参数指定平行四边形的三个点。The destPoints parameter specifies three points of a parallelogram. 这三个 Point 结构表示平行四边形的左上角、右上角和左下角。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.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
PointF

PointF 结构,它指定所绘制图元文件的左上角的位置。PointF structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the method of the specific Metafile that is being enumerated.

由参数指定的图像属性 imageAttr 替换在写入元文件时指定的属性。The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

另请参阅

适用于

EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
Point

Point 结构,它指定所绘制图元文件的左上角的位置。Point structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

下面的代码示例创建一个窗体,该窗体具有 Metafile 作为其一个私有成员的。The following code example creates a form that has a Metafile as one of its private members. OnPaint方法调用 EnumerateMetafile ,此方法将 MetafileCallback 为图元文件中的每个记录调用窗体的方法。The OnPaint method calls EnumerateMetafile, which calls the form's MetafileCallback method for each record in the metafile. MetafileCallback 方法调用 PlayRecord 方法。The MetafileCallback method calls the PlayRecord method. 请注意, MetafileCallback 方法接收的记录数据为 IntPtr ,但 PlayRecord 方法要求记录数据是字节数组。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. 对的调用将 Copy 记录数据复制到字节数组,以便可以将其传递给 PlayRecordThe 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

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
Point[]

由三个 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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于

EnumerateMetafile(Metafile, PointF, Graphics+EnumerateMetafileProc)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
PointF

PointF 结构,它指定所绘制图元文件的左上角的位置。PointF structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
PointF[]

由三个 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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

destPoints参数指定平行四边形的三个点。The destPoints parameter specifies three points of a parallelogram. 这三个 PointF 结构表示平行四边形的左上角、右上角和左下角。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.

另请参阅

适用于

EnumerateMetafile(Metafile, RectangleF, Graphics+EnumerateMetafileProc)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
RectangleF

RectangleF 结构,它指定所绘制图元文件的位置和大小。RectangleF structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
Point

Point 结构,它指定所绘制图元文件的左上角的位置。Point structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafileFor a code example, see EnumerateMetafile.

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
Point[]

由三个 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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

适用于

EnumerateMetafile(Metafile, Rectangle, Graphics+EnumerateMetafileProc)

将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
Rectangle

Rectangle 结构,它指定所绘制图元文件的位置和大小。Rectangle structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
PointF[]

由三个 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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

destPoints参数指定平行四边形的三个点。The destPoints parameter specifies three points of a parallelogram. 这三个 PointF 结构表示平行四边形的左上角、右上角和左下角。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.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
Rectangle

Rectangle 结构,它指定所绘制图元文件的位置和大小。Rectangle structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destRect
RectangleF

RectangleF 结构,它指定所绘制图元文件的位置和大小。RectangleF structure that specifies the location and size of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
Point

Point 结构,它指定所绘制图元文件的左上角的位置。Point structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
Point

Point 结构,它指定所绘制图元文件的左上角的位置。Point structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
Rectangle

Rectangle 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。Rectangle structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoints
Point[]

由三个 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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

imageAttr
ImageAttributes

ImageAttributes,它指定所绘制图像的图像特性信息。ImageAttributes that specifies image attribute information for the drawn image.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

destPoints参数指定平行四边形的三个点。The destPoints parameter specifies three points of a parallelogram. 这三个 Point 结构表示平行四边形的左上角、右上角和左下角。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.

由参数指定的图像属性 imageAttr 替换在写入元文件时指定的属性。The image attributes specified by the imageAttr parameter replace those specified when the metafile was written.

另请参阅

适用于

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

Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
PointF

PointF 结构,它指定所绘制图元文件的左上角的位置。PointF structure that specifies the location of the upper-left corner of the drawn metafile.

srcRect
RectangleF

RectangleF 结构,它相对于图元文件的左上角指定要绘制的部分图元文件。RectangleF structure that specifies the portion of the metafile, relative to its upper-left corner, to draw.

srcUnit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定度量单位,该度量单位用于确定 srcRect 参数指定的矩形所包含的部分图元文件。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 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

将忽略在参数所指定的矩形之外发生的任何绘制 srcRectAny drawing that takes place outside of the rectangle specified by the srcRect parameter is ignored.

适用于

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

将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。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)

参数

metafile
Metafile

要枚举的 MetafileMetafile to enumerate.

destPoint
PointF

PointF 结构,它指定所绘制图元文件的左上角的位置。PointF structure that specifies the location of the upper-left corner of the drawn metafile.

callback
Graphics.EnumerateMetafileProc

Graphics.EnumerateMetafileProc 委托,它指定将图元文件记录发送到的方法。Graphics.EnumerateMetafileProc delegate that specifies the method to which the metafile records are sent.

callbackData
IntPtr

必需但被忽略的内部指针。Internal pointer that is required, but ignored. 可以为此参数传递 ZeroYou can pass Zero for this parameter.

示例

有关代码示例,请参阅 EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc)For a code example, see EnumerateMetafile(Metafile, Point, Graphics+EnumerateMetafileProc).

注解

此方法枚举指定的图元文件中包含的记录。This method enumerates the records contained in the specified metafile. 每个记录将分别发送到由参数指定的回调方法 callbackEach record is individually sent to a callback method specified by the callback parameter. 通常,回调方法会调用 PlayRecord 方法以 "播放" 或绘制记录。Typically, the callback method calls the PlayRecord method to "play back", or draw, the record.

如果回调方法调用 PlayRecord ,则它必须通过调用所枚举的 PlayRecord 特定的方法来执行此操作 MetafileIf the callback method calls PlayRecord, it must do so by calling the PlayRecord method of the specific Metafile that is being enumerated.

另请参阅

适用于