ImportMetafile imports a WMF or EMF vectorial image.

Width and Height are required image sizes (the rectangle where the vectorial image will be painted).

To maintain image ratio set only one size, assigning -1 to the other.

Namespace: HiComponents.IEvolution
Assembly: IEvolution2 (in IEvolution2.dll) Version: 10.1.0.0

Syntax

         
 C#  Visual Basic  Visual C++ 
public bool ImportMetaFile(
	string fileName,
	int width,
	int height,
	bool withAlpha,
	IERGB backgroundFill,
	bool maintainAR
)
Public Function ImportMetaFile ( _
	fileName As String, _
	width As Integer, _
	height As Integer, _
	withAlpha As Boolean, _
	backgroundFill As IERGB, _
	maintainAR As Boolean _
) As Boolean
public:
bool ImportMetaFile(
	String^ fileName, 
	int width, 
	int height, 
	bool withAlpha, 
	IERGB backgroundFill, 
	bool maintainAR
)

Parameters

fileName
String
Used to indicate the file path with extension
width
Int32
Required width (-1 maintain aspect ratio)
height
Int32
Required height (-1 maintain aspect ratio)
withAlpha
Boolean
If withAlpha is true ImportMetaFile create an alpha channel, making visible only the metafile content
backgroundFill
IERGB
Specifies the fill for the non-content area of the image
maintainAR
Boolean
Maintain aspect ratio

Return Value

Returns true on success

Examples

This sample shows how to load test1.wmf

CopyC#
Image.ImportMetaFile("test1.wmf",1000,-1);

See Also