home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / opus / v5 / opussdk / amigaguide / dopus / images.h < prev    next >
C/C++ Source or Header  |  1977-12-31  |  3KB  |  83 lines

  1. @DATABASE "dopus/images.h"
  2. @MASTER   "opussdk:include/dopus/images.h"
  3. @REMARK   (c) Dr Greg Perry and Jonathan Potter, GPSoftware 1996
  4. @REMARK   This file was initially created by ADtoHT 2.1 on 07-Sep-96 18:20:14
  5. @REMARK   ADtoHT is © 1993-1995 Christian Stieber
  6.  
  7. @NODE MAIN "dopus/images.h"
  8. @TOC "DopusSDK/MAIN"
  9.  
  10. @{"dopus/images.h" LINK File}
  11.  
  12.  
  13. @{b}Typedefs@{ub}
  14.  
  15. @{"ImageRemap" LINK "dopus/images.h/File" 23}  @{"OpenImageInfo" LINK "dopus/images.h/File" 37}
  16.  
  17.  
  18. @{b}#defines@{ub}
  19.  
  20. @{"IM_ClipBoundary" LINK "dopus/images.h/File" 17}     @{"IM_Depth" LINK "dopus/images.h/File" 16}             @{"IM_Erase" LINK "dopus/images.h/File" 18}
  21. @{"IM_Height" LINK "dopus/images.h/File" 12}           @{"IM_Mask" LINK "dopus/images.h/File" 15}              @{"IM_NoDrawInvalid" LINK "dopus/images.h/File" 19}
  22. @{"IM_NoIconRemap" LINK "dopus/images.h/File" 20}      @{"IM_Rectangle" LINK "dopus/images.h/File" 14}         @{"IM_State" LINK "dopus/images.h/File" 13}
  23. @{"IM_Width" LINK "dopus/images.h/File" 11}            @{"IRF_PRECISION_EXACT" LINK "dopus/images.h/File" 32}  @{"IRF_PRECISION_GUI" LINK "dopus/images.h/File" 34}
  24. @{"IRF_PRECISION_ICON" LINK "dopus/images.h/File" 33}  @{"IRF_REMAP_COL0" LINK "dopus/images.h/File" 31}       
  25.  
  26. @ENDNODE
  27. @NODE File "dopus/images.h"
  28. #ifndef _DOPUS_IMAGES
  29. #define _DOPUS_IMAGES
  30.  
  31. /*****************************************************************************
  32.  
  33.  Images
  34.  
  35.  *****************************************************************************/
  36.  
  37. // RenderImage() tags
  38. #define IM_Width                TAG_USER + 0    // Width of image
  39. #define IM_Height               TAG_USER + 1    // Height of image
  40. #define IM_State                TAG_USER + 2    // 1 = selected, 0 = normal (default)
  41. #define IM_Rectangle            TAG_USER + 3    // Rectangle to center within
  42. #define IM_Mask                 TAG_USER + 4    // 1 = mask image
  43. #define IM_Depth                TAG_USER + 5    // Depth of image
  44. #define IM_ClipBoundary         TAG_USER + 6    // Clip boundary size
  45. #define IM_Erase                TAG_USER + 7    // Erase background
  46. #define IM_NoDrawInvalid        TAG_USER + 8    // Don't draw if image is invalid
  47. #define IM_NoIconRemap          TAG_USER + 9    // Don't remap icons
  48.  
  49. // Images remapping
  50. typedef struct
  51.         struct Screen   *ir_Screen;
  52.         unsigned short  *ir_PenArray;
  53.         short           ir_PenCount;
  54.         unsigned long   ir_Flags;
  55. } ImageRemap;
  56.  
  57. #define IRF_REMAP_COL0          (1<<0)          // Remap colour 0
  58. #define IRF_PRECISION_EXACT     (1<<1)          // Remap precision
  59. #define IRF_PRECISION_ICON      (1<<2)
  60. #define IRF_PRECISION_GUI       (1<<3)
  61.  
  62. // Open an image in memory (for remapping)
  63. typedef struct
  64.         USHORT  *oi_ImageData;
  65.         ULONG   *oi_Palette;
  66.         short   oi_Width;
  67.         short   oi_Height;
  68.         short   oi_Depth;
  69. } OpenImageInfo;
  70.  
  71. void CloseImage(APTR image);
  72. APTR CopyImage(APTR image);
  73. void FreeImageRemap(@{"ImageRemap" LINK File 23} *);
  74. void FreeRemapImage(APTR,@{"ImageRemap" LINK File 23} *);
  75. void GetImageAttrs(APTR image,struct TagItem *tags);
  76. ULONG *GetImagePalette(APTR image);
  77. APTR OpenImage(char *name,@{"OpenImageInfo" LINK File 37} *);
  78. BOOL RemapImage(APTR,struct Screen *,ImageRemap *);
  79. short RenderImage(struct RastPort *rp,APTR image,unsigned short left,unsigned short top,struct TagItem *tags);
  80.  
  81. #endif
  82. @ENDNODE
  83.