index.htmlMain Page    classes.htmlAlphabetical List    annotated.htmlData Structures    files.htmlFile List    functions.htmlData Fields    globals.htmlGlobals    player.c File Reference
Functions
types_8h.html#a5wmf_error_t  player_8c.html#a0wmf_player_init  ( types_8h.html#a22wmfAPI  *API) types_8h.html#a5wmf_error_t  player_8c.html#a1wmf_scan  ( types_8h.html#a22wmfAPI  *API, unsigned long flags, types_8h.html#a15wmfD_Rect  *d_r) types_8h.html#a5wmf_error_t  player_8c.html#a2wmf_size  ( types_8h.html#a22wmfAPI  *API, float *width, float *height) types_8h.html#a5wmf_error_t  player_8c.html#a3wmf_display_size  ( types_8h.html#a22wmfAPI  *API, unsigned int *width, unsigned int *height, double res_x, double res_y) types_8h.html#a5wmf_error_t  player_8c.html#a4wmf_play  ( types_8h.html#a22wmfAPI  *API, unsigned long flags, types_8h.html#a15wmfD_Rect  *d_r) Function Documentation
  
    
      
        
          
 types_8h.html#a5wmf_error_t  wmf_display_size           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
unsigned int *           
  width,         
        
          
          
          
unsigned int *           
  height,         
        
          
          
          
double           
  res_x,         
        
          
          
          
double           
  res_y         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Get estimate of image display size.
Parameters: API the API handle 
width width return 
height height return 
res_x x-resolution of display 
res_y y-resolution of display
player_8c.html#a3wmf_display_size()  returns image width in *width and image height in *height. player_8c.html#a2wmf_size()  is used to get the calculated/estimate width and height of the image, and these values are converted to integer width and height estimates for display.
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).       
  
    
      
        
          
 types_8h.html#a5wmf_error_t  wmf_play           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
unsigned long           
  flags,         
        
          
          
          
types_8h.html#a15wmfD_Rect  *           
  d_r         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Play the metafile.
Parameters: API the API handle 
flags (unused) 
d_r for bounding-box return
Before the metafile can be played, it must be scanned - see player_8c.html#a1wmf_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 api_8h.html#a22wmf_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 api_8h.html#a23wmf_api_destroy() .
d_r is recomputed, but should not change.
Returns: Returns the library error state (
wmf_E_None on success).       
  
    
      
        
          
 types_8h.html#a5wmf_error_t  wmf_player_init           
(           
types_8h.html#a22wmfAPI  *           
                     
)           
        
      
    
  
  
    
       
    
    
Initializes the metafile player (called by 
api_8h.html#a22wmf_api_create() )       
  
    
      
        
          
 types_8h.html#a5wmf_error_t  wmf_scan           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
unsigned long           
  flags,         
        
          
          
          
types_8h.html#a15wmfD_Rect  *           
  d_r         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Scan the metafile.
Parameters: API the API handle 
flags (unused) 
d_r for bounding-box return
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 api_8h.html#a22wmf_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).       
  
    
      
        
          
 types_8h.html#a5wmf_error_t  wmf_size           
(           
types_8h.html#a22wmfAPI  *           
  API,         
        
          
          
          
float *           
  width,         
        
          
          
          
float *           
  height         
        
          
          
)           
        
      
    
  
  
    
       
    
    
Get image size.
Parameters: API the API handle 
width width return 
height height return
player_8c.html#a2wmf_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 player_8c.html#a1wmf_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).       
Generated on Tue Dec 10 19:53:51 2002 for libwmf by
http://www.doxygen.org/index.htmldoxygen 1.2.18 