Metafile (WMF, EMF) – is the universal format of vector graphic files, that makes an integral part of Windows operation system. That is why Windows API offers a wide set of options for this vector format creation, reading, writing, displaying. It’s a pity but quality of the image displayed (rasterized) with the help of the PlayMetaFile/PlayEnhMetaFile function does not always satisfy independent developers.
The MFRasterizer Library helps to significantly increase quality of your Windows metafiles (WMF, EMF) displayed in your programs. Usage of the smoothing (antialiasing) algorithm while rasterizing vector images, helps to eliminate “steps” at the borders of polygons. The additional feature of MFRasterizer Library is availability of image scale and rotation parameters that allows for example to use Windows vector metafiles (WMF, EMF) for geographical maps systems developing.
Comparison of vector image rasterization
Comparison of text rasterization
MFRasterizer Library for Windows metafiles (WMF, EMF) rasterization is promoted in DEMO version. You can use the DEMO version of MFRasterizer Library for your programs developing but if you are going to use or to sell them you have to acquire the license.
| Commercial License This license allows MFRasterizer Library to be used by a company in one software product |
$999 |
 |
| Corporate License This license allows MFRasterizer Library to be used by a company in any software products |
$2999 |
 |
Purpose of MFRasterizerFile function is to provide simple and quality Windows metafiles (WMF, EMF) rasterization in your programs. Input parameters of the function are rasterization parameters and full path to metafile. Returns TRUE if completed successfully.
There are two versions of this function. One is to be used for metafile path in ANSI encoding; the other one is to be used for metafile path in UNICODE.
bool MFRasterizerFile(
HDC hDC,
char* pcFilename,
RECT* pRect,
unsigned char bTransparency,
bool bProp,
double dAngle
);
bool MFRasterizerFileW(
HDC hDC,
wchar_t* pwcFilename,
RECT* pRect,
unsigned char bTransparency,
bool bProp,
double dAngle
);
| Parameter |
Description |
| hDC |
Handle to the device context of the rasterized metafile being displayed. |
| pcFilename |
Path to metafile (ANSI encoding). |
| pwcFilename |
Path to metafile (UNICODE encoding). |
| pRect |
Pointer to a RECT structure that contains the coordinates of the bounding rectangle used to display the picture. |
| bTransparency |
Transparency index (from 0 to 255, 0 – absolutely transparent image). |
| bProp |
Proportionality tag. If TRUE is chosen than image is going to be rasterized according to ratio of its’ sizes. |
| dAngle |
Radian angle of image rotation. |
MFRasterizer function is designed for the most effective usage of Windows metafiles (WMF, EMF) rasterization library. Metafile descriptor is used as an input parameter. It is also possible to set parameters for the image to be enlarged while being rasterized. Returns TRUE if completed successfully.
bool MFRasterizer(
HDC hDC,
HENHMETAFILE hMetafile,
RECT* pRect,
unsigned char bTransparency,
double dAngle,
double dX1,
double dY1,
double dX2,
double dY2
);
| Parameter |
Description |
| hDC |
Handle to the device context of the rasterized metafile being displayed. |
| hMetafile |
Metafile handle for rasterization. |
| pRect |
Pointer to a RECT structure that contains the coordinates of the bounding rectangle used to display the picture. |
| bTransparency |
Transparency index (from 0 to 255, 0 – absolutely transparent image). |
| dAngle |
Radian angle of image rotation. |
| dX1 |
Coordinate of metafile left upper corner for the purpose of rasterization (relative units, from 0 to 1). Used for images scaling. |
| dY1 |
| dX2 |
Coordinate of metafile right down corner for the purpose of rasterization (relative units, from 0 to 1). Used for images scaling. |
| dY2 |
MFRasterizer Library for Windows metafiles (WMF, EMF) rasterization is developed with the help of the graphic library Anti-Grain Geometry (AGG).