# NAME

META_SETMAPMODE

# NEAREST API CALL

    #include <windows.h>
    INT32 SetMapMode
    (
        HDC32 hdc,
        INT32 mode
    );

# DESCRIPTION

U16 | Value
0 | MapMode

SetMapMode sets the mapping mode to one of MM_TEXT, MM_LOMETRIC,MM_HIMETRIC, MM_LOENGLISH,MM_HIENGLISH,MM_TWIPS,MM_ISOTROPIC,MM_ANISOTROPIC
Set this doc for explanation

Id like to point out here, that some wmf files do not set a mapping mode at all, and while the referenced doc here puts MM_TEXT as the default mapping mode, in practice when no map mode is set and the wmf isn't a placeable wmf, i.e. there is no information at all about the desired size of the wmf, then this is a problem because

- wmfs exist which expect to be played in MM_TEXT mode where each unit is a pixel and
- wmfs exist which expect to be played in MM_TWIPS mode where each unit is 1/1440 or an inch.

and neither set a MAPMODE. (grrr) so arbitrarily i put non-placeable wmf files that have no MAPMODE set into MM_TEXT mode if they are < 400 x 400 and into the other mode if they are not.

back