1 #ifndef DATATYPES_PICTURECLASS_H 2 #define DATATYPES_PICTURECLASS_H 3 4 /* 5 datatypes picture-object definitions (V50) 6 7 Copyright © 2002 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef UTILITY_TAGITEM_H 11 # include <utility/tagitem.h> 12 #endif 13 14 #ifndef DATATYPES_DATATYPESCLASS_H 15 # include <datatypes/datatypesclass.h> 16 #endif 17 18 #ifndef LIBRARIES_IFFPARSE_H 19 # include <libraries/iffparse.h> 20 #endif 21 22 #pragma pack(2) 23 24 25 #define PICTUREDTCLASS "picture.datatype" 26 27 28 /* Picture attributes */ 29 30 #define PDTA_ModeID (DTA_Dummy + 200) 31 #define PDTA_BitMapHeader (DTA_Dummy + 201) 32 #define PDTA_BitMap (DTA_Dummy + 202) 33 #define PDTA_ColorRegisters (DTA_Dummy + 203) 34 #define PDTA_CRegs (DTA_Dummy + 204) 35 #define PDTA_GRegs (DTA_Dummy + 205) 36 #define PDTA_ColorTable (DTA_Dummy + 206) 37 #define PDTA_ColorTable2 (DTA_Dummy + 207) 38 #define PDTA_Allocated (DTA_Dummy + 208) 39 #define PDTA_NumColors (DTA_Dummy + 209) 40 #define PDTA_NumAlloc (DTA_Dummy + 210) 41 #define PDTA_Remap (DTA_Dummy + 211) 42 #define PDTA_Screen (DTA_Dummy + 212) 43 #define PDTA_FreeSourceBitMap (DTA_Dummy + 213) 44 #define PDTA_Grab (DTA_Dummy + 214) 45 #define PDTA_DestBitMap (DTA_Dummy + 215) 46 #define PDTA_ClassBitMap (DTA_Dummy + 216) 47 #define PDTA_NumSparse (DTA_Dummy + 217) 48 #define PDTA_SparseTable (DTA_Dummy + 218) 49 50 /*** V44 ***/ 51 52 #define PDTA_WhichPicture (DTA_Dummy + 219) 53 #define PDTA_GetNumPictures (DTA_Dummy + 220) 54 #define PDTA_MaxDitherPens (DTA_Dummy + 221) 55 #define PDTA_DitherQuality (DTA_Dummy + 222) 56 #define PDTA_AllocatedPens (DTA_Dummy + 223) 57 58 /*** V45 ***/ 59 60 #define PDTA_ScaleQuality (DTA_Dummy + 224) 61 62 63 #define PDTANUMPICTURES_Unknown (0) 64 65 66 /* V43 extensions (attributes) */ 67 68 #define PDTA_SourceMode (DTA_Dummy + 250) 69 #define PDTA_DestMode (DTA_Dummy + 251) 70 #define PDTA_PixelFormat (DTA_Dummy + 252) 71 #define PDTA_TransRemapPen (DTA_Dummy + 253) 72 #define PDTA_NumPixMapDir (DTA_Dummy + 254) 73 #define PDTA_UseFriendBitMap (DTA_Dummy + 255) 74 #define PDTA_AlphaChannel (DTA_Dummy + 256) 75 #define PDTA_MultiRemap (DTA_Dummy + 257) 76 #define PDTA_MaskPlane (DTA_Dummy + 258) 77 #define PDTA_Displayable (DTA_Dummy + 259) /* defaults to TRUE */ 78 79 /* Interface modes */ 80 81 #define PMODE_V42 (0) 82 #define PMODE_V43 (1) 83 84 85 /* V43 extensions (methods) */ 86 87 #define PDTM_Dummy (DTM_Dummy + 0x60) 88 #define PDTM_WRITEPIXELARRAY (PDTM_Dummy + 0) 89 #define PDTM_READPIXELARRAY (PDTM_Dummy + 1) 90 #define PDTM_CREATEPIXMAPDIR (PDTM_Dummy + 2) 91 #define PDTM_FIRSTPIXMAPDIR (PDTM_Dummy + 3) 92 #define PDTM_NEXTPIXMAPDIR (PDTM_Dummy + 4) 93 #define PDTM_PREVPIXMAPDIR (PDTM_Dummy + 5) 94 #define PDTM_BESTPIXMAPDIR (PDTM_Dummy + 6) 95 96 97 struct pdtBlitPixelArray 98 { 99 ULONG MethodID; 100 APTR pbpa_PixelData; 101 ULONG pbpa_PixelFormat; 102 ULONG pbpa_PixelArrayMod; 103 ULONG pbpa_Left; 104 ULONG pbpa_Top; 105 ULONG pbpa_Width; 106 ULONG pbpa_Height; 107 }; 108 109 110 /* Pixel formats */ 111 112 #define PBPAFMT_RGB 0 113 #define PBPAFMT_RGBA 1 114 #define PBPAFMT_ARGB 2 115 #define PBPAFMT_LUT8 3 116 #define PBPAFMT_GREY8 4 117 118 119 /* V45 extensions (methods) */ 120 121 #define PDTM_SCALE (PDTM_Dummy + 2) 122 123 124 struct pdtScale 125 { 126 ULONG MethodID; 127 ULONG ps_NewWidth; 128 ULONG ps_NewHeight; 129 ULONG ps_Flags; 130 }; 131 132 133 /* Masking techniques */ 134 135 #define mskNone 0 136 #define mskHasMask 1 137 #define mskHasTransparentColor 2 138 #define mskLasso 3 139 #define mskHasAlpha 4 140 141 /* Compression techniques */ 142 143 #define cmpNone 0 144 #define cmpByteRun1 1 145 #define cmpByteRun2 2 146 147 148 struct BitMapHeader 149 { 150 UWORD bmh_Width; 151 UWORD bmh_Height; 152 WORD bmh_Left; 153 WORD bmh_Top; 154 UBYTE bmh_Depth; 155 UBYTE bmh_Masking; 156 UBYTE bmh_Compression; 157 UBYTE bmh_Pad; 158 UWORD bmh_Transparent; 159 UBYTE bmh_XAspect; 160 UBYTE bmh_YAspect; 161 WORD bmh_PageWidth; 162 WORD bmh_PageHeight; 163 }; 164 165 166 struct ColorRegister 167 { 168 UBYTE red, green, blue; 169 }; 170 171 172 #define ID_ILBM MAKE_ID('I','L','B','M') 173 #define ID_BMHD MAKE_ID('B','M','H','D') 174 #define ID_CMAP MAKE_ID('C','M','A','P') 175 #define ID_CRNG MAKE_ID('C','R','N','G') 176 #define ID_GRAB MAKE_ID('G','R','A','B') 177 #define ID_SPRT MAKE_ID('S','P','R','T') 178 #define ID_DEST MAKE_ID('D','E','S','T') 179 #define ID_CAMG MAKE_ID('C','A','M','G') 180 181 #ifndef ID_BODY 182 # define ID_BODY MAKE_ID('B','O','D','Y') 183 #endif 184 185 186 #pragma pack() 187 188 #endif /* DATATYPES_PICTURECLASS_H */