Export (0) Print
Expand All
Expand Minimize

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

.NET Framework 1.1

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

[Visual Basic]
Overloads Public Sub EnumerateMetafile( _
   ByVal metafile As Metafile, _
   ByVal destPoints() As PointF, _
   ByVal srcRect As RectangleF, _
   ByVal srcUnit As GraphicsUnit, _
   ByVal callback As Graphics.EnumerateMetafileProc _
)
[C#]
public void EnumerateMetafile(
 Metafile metafile,
 PointF[] destPoints,
 RectangleF srcRect,
 GraphicsUnit srcUnit,
 Graphics.EnumerateMetafileProc callback
);
[C++]
public: void EnumerateMetafile(
 Metafile* metafile,
 PointF destPoints[],
 RectangleF srcRect,
 GraphicsUnit srcUnit,
 Graphics.EnumerateMetafileProc* callback
);
[JScript]
public function EnumerateMetafile(
   metafile : Metafile,
 destPoints : PointF[],
 srcRect : RectangleF,
 srcUnit : GraphicsUnit,
 callback : Graphics.EnumerateMetafileProc
);

Parameters

metafile
Metafile object to enumerate.
destPoints
Array of three PointF structures that define a parallelogram that determines the size and location of the drawn metafile.
srcRect
RectangleF structures that specifies the portion of the metafile, relative to its upper-left corner, to draw.
srcUnit
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 delegate that specifies the method to which the metafile records are sent.

Return Value

This method does not return a value.

Remarks

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

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

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

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

Example

For an example see EnumerateMetafile.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Graphics Class | Graphics Members | System.Drawing Namespace | Graphics.EnumerateMetafile Overload List

Show:
© 2014 Microsoft