| Herd Software Development
|=
DaVinci Graphics Library
|==
DaVinci Documentation Home Search Order


Leonardo: The RotateMetaFile function

Rotates a metafile in multiples of 90 degrees. (A separate routine is provided for enhanced metafiles.)

HMETAFILE API RotateMetaFile(
HMETAFILE hMetaFile,
int iAngle,
LPMETARESOLUTION lpMetaRes);

hMetaFile HMETAFILE Handle of the source metafile on which the rotated copy is based.

iAngle int Angle of rotation. Must be specified as one of the three following values:
900 : Rotate 90° to the left
-900 : Rotate 90° to the right
1800 : Rotate 180° onto the heading.

lpMetaRes LPMETARESOLUTION Pointer to a METARESOLUTION structure with metric size specifications for the metafile. This information is used to apply the appropriate dimensions to the output metafile.

Returns

If successful, the return value is a handle to a rotated copy of the source metafile, otherwise it is NULL. Failure is generally due to insufficient memory. The handle can be passed to PlayMetaFile for playing immediately upon return. Applications must release this handle using DeleteMetaFile.

Remarks

Windows metafiles can be highly complex data structures. Whether this function produces a pleasing result depends a greead deal on the quality of the original file.

Metafiles produced via DXF file import (DaVinci) can be rotated using this function.

Metafiles generated via EPS import (DaVinci) cannot be rotated using this function.