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

  1. /*** draw_pic.h ***/
  2. /* Routines for loading and displaying a Draw file
  3.  * (c) Paul Field 1995
  4.  * v1.00 - 24/11/95
  5.  */
  6.  
  7. #ifndef os_H
  8. #include "os.h"
  9. #endif
  10.  
  11.  
  12. /* Opaque type */
  13. typedef struct draw_pic_str draw_pic;
  14.  
  15.  
  16. draw_pic *draw_pic_create(const char *file_name);
  17.  /* Pre: file_name is a Draw file
  18.   * Exceptions: exception_NO_MEMORY, os (file errors)
  19.   * Creates a draw_pic from the file 'file_name' and returns it
  20.   */
  21.  
  22. void draw_pic_destroy(draw_pic *pic);
  23.  /* Frees the memory associated with 'pic'
  24.   */
  25.  
  26. void draw_pic_draw(const draw_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 draw_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 draw_pic_size(const draw_pic *pic, unsigned *width, unsigned *height);
  35.  /* Pre: pic != NULL
  36.   *      width != NULL
  37.   *      height != NULL
  38.   * Returns the width and height of the draw_pic in OS units
  39.   */
  40.