Before the metafile can be played, it must be scanned - see wmf_scan().
The first time (and only the first time) the metafile is played, it first calls device_open() for the device layer specified (and initialized) in wmf_api_create(). Then, and also each subsequent time the metafile is played, it calls device_begin(), plays the metafile (with calls to various other device layer functions), and finally it calls device_end(). device_close() is only ever called via wmf_api_destroy().
d_r is recomputed, but should not change.
Returns:
Returns the library error state (wmf_E_None on success).
Before the metafile can be played, it must be scanned. This is because metafile headers do not always provide image size information. Although the device layer (the graphics exporter) is initialized in wmf_api_create(), the output device is not opened until after the metafile is scanned. By scanning, therefore, the device layer can be provided on opening not only with size information but also a list of colors to expect (not including those in raster images) and of other required resources, if necessary. Finally, if scanning fails, then there's certainly no point in playing the metafile.
The bounding box, in device coordinates, is returned in *d_r.
Returns:
Returns the library error state (wmf_E_None on success).
wmf_size() returns image width in *width and image height in *height. If supplied, the metafile header values are used, otherwise the width and height found by wmf_scan() are used.
Returns:
Returns the library error state (wmf_E_None on success). Possible library error state of wmf_E_Glitch (the metafile has not been scanned).