home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / toollib_2 / Examples / GFXView / Builds / h / sprite_pic < prev    next >
Encoding:
Text File  |  1995-11-24  |  1.1 KB  |  40 lines

  1. /*** sprite_pic.h ***/
  2. /* Routines for loading and displaying a sprite
  3.  * (c) Paul Field 1995
  4.  * v1.00 - 6/10/95
  5.  * v1.01 - 24/11/95 - added 'clip' parameter to sprite_pic_draw()
  6.  */
  7.  
  8. #ifndef os_H
  9. #include "os.h"
  10. #endif
  11.  
  12. /* Opaque type */
  13. typedef struct sprite_pic_str sprite_pic;
  14.  
  15.  
  16. sprite_pic *sprite_pic_create(const char *file_name);
  17.  /* Pre: file_name is a sprite file
  18.   * Exceptions: exception_NO_MEMORY, os (file errors)
  19.   * Creates a sprite_pic from the file 'file_name' and returns it
  20.   */
  21.  
  22. void sprite_pic_destroy(sprite_pic *pic);
  23.  /* Frees the memory associated with 'pic'
  24.   */
  25.  
  26. void sprite_pic_draw(const sprite_pic *pic, int origin_x, int origin_y, unsigned scale_percent, const os_box *clip);
  27.  /* Pre: pic != NULL
  28.   *      We're drawing in the current Wimp mode
  29.   * Draws the sprite_pic with it's bottom left corner at (origin_x, origin_y)
  30.   * scaled by 'scale_percent'%
  31.   * 'clip' should be the current graphics window
  32.   */
  33.  
  34. void sprite_pic_size(const sprite_pic *pic, unsigned *width, unsigned *height);
  35.  /* Pre: pic != NULL
  36.   *      width != NULL
  37.   *      height != NULL
  38.   * Returns the width and height of the sprite_pic in OS units
  39.   */
  40.