From 3942b12185bddb1c48831f2b6e3984b9ea80b515 Mon Sep 17 00:00:00 2001 From: Casey Corn Date: Fri, 6 Jun 2003 03:21:39 +0000 Subject: Hopfully fixed the readability issue by using distributed group docs. --- source/blender/imbuf/IMB_imbuf_types.h | 201 ++++++--------------------------- 1 file changed, 33 insertions(+), 168 deletions(-) (limited to 'source/blender/imbuf/IMB_imbuf_types.h') diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index ee504cc6f55..c207893575c 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -41,6 +41,12 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ +/** + * \file IMB_imbuf_types.h + * \ingroup imbuf + * \brief Contains defines and structs used throughout the imbuf module. + * \todo Clean up includes. + */ #ifndef IMB_IMBUF_TYPES_H #define IMB_IMBUF_TYPES_H @@ -58,8 +64,8 @@ struct Mdec; * */ typedef struct ImBuf{ - short x; /**< Width in pixels */ - short y; /**< Height in scanlines */ + /** Width in pixels */ + short x, y; /**< Height in scanlines */ short skipx; /**< Width in ints to get to the next scanline */ unsigned char depth; /**< Active amount of bits/bitplanes */ unsigned char cbits; /**< Amount of active bits in cmap */ @@ -72,16 +78,16 @@ typedef struct ImBuf{ unsigned int **planes; /**< bitplanes */ int flags; /**< Controls which components should exist. */ int mall; /**< what is malloced internal, and can be freed */ - short xorig; /**< X origin. What is this relative to? */ - short yorig; /**< Y origin. What is this relative to? */ + /** X origin. What is this relative to? */ + short xorig, yorig; /**< Y origin. What is this relative to? */ char name[1023]; /**< The file name */ char namenull; /**< What does this do?*/ int userflags; /**< What does this do? Holds an enum ImBuf_userflagsMask?*/ int *zbuf; /**< A z buffer */ void *userdata; /**< What does this do?*/ - unsigned char *encodedbuffer; /** What is an encoded buffer? */ - unsigned int encodedsize; /** What is an encoded buffer? */ - unsigned int encodedbuffersize; /** What is an encoded buffer? */ + unsigned char *encodedbuffer; /**< Does encoded mean compressed? */ + unsigned int encodedsize; /**< Compressed size?? */ + unsigned int encodedbuffersize; /**< Uncompressed size?? */ } ImBuf; /* Moved from BKE_bmfont_types.h because it is a userflag bit mask. */ @@ -101,240 +107,99 @@ typedef enum { * on. */ /** - * \brief Rectangle flag + * \name Imbuf Component flags + * \brief These flags determine the components of an ImBuf struct. */ +/**@{*/ +/** \brief Flag defining the components of the ImBuf struct. */ #define IB_rect (1 << 0) -/** - * \brief Bitmap Planes flag - */ #define IB_planes (1 << 1) -/** - * \brief Color map flag - */ #define IB_cmap (1 << 2) -/** - * \brief Vertex flag - */ #define IB_vert (1 << 4) -/** - * \brief Free Memory flag - */ #define IB_freem (1 << 6) -/** - * \brief Test flag - */ #define IB_test (1 << 7) -/** - * \brief True Type object?? - */ #define IB_ttob (1 << 8) #define IB_subdlta (1 << 9) -/** - * \brief Video fields flag - */ #define IB_fields (1 << 11) -/** - * \brief Zbuffer flag - */ #define IB_zbuf (1 << 13) -/** - * \brief Memory flag? - */ #define IB_mem (1 << 14) +/**@}*/ -/** - * \brief .ami (amiga) filetype +/** \name imbuf_formats Image file formats + * \brief These defines are bit flags for the various image file formats. */ -#define AMI (1 << 31) -/** - * \brief .png filetype +/**@{*/ +/** \brief Identifier for an image file format. + * + * The bit flag is stored in the ImBuf.ftype variable. */ +#define AMI (1 << 31) #define PNG (1 << 30) -/** - * \brief .??? (Anim) filetype - */ #define Anim (1 << 29) -/** - * \brief .tga (targa) filetype - */ #define TGA (1 << 28) -/** - * \brief .jpg (JPEG) filetype - */ #define JPG (1 << 27) -/** - * \brief .bmp filetype - */ #define BMP (1 << 26) #ifdef WITH_QUICKTIME -/** - * \brief .mov? (Quicktime) filetype - */ #define QUICKTIME (1 << 25) #endif #ifdef WITH_FREEIMAGE -/** - * \brief .??? (Freeimage) filetype - */ #define FREEIMAGE (1 << 24) #endif #ifdef WITH_IMAGEMAGICK -/** - * \brief .im? (ImageMagick) filetype - */ #define IMAGEMAGICK (1 << 23) #endif -/** - * \brief tga of type "raw" - */ #define RAWTGA (TGA | 1) -/** - * \brief jpg of type "standard"? - */ #define JPG_STD (JPG | (0 << 8)) -/** - * \brief jpg of type "video"? - */ #define JPG_VID (JPG | (1 << 8)) -/** - * \brief jpg of type "jst"? - */ #define JPG_JST (JPG | (2 << 8)) -/** - * \brief jpg of type "max"? - */ #define JPG_MAX (JPG | (3 << 8)) -/** - * \brief Masks off the last two bytes. - */ #define JPG_MSK (0xffffff00) -/** - * \brief .ham? Anim filetype - */ #define AM_ham (0x0800 | AMI) -/** - * \brief .??? Anim filetype - */ #define AM_hbrite (0x0080 | AMI) -/** - * \brief c233 type for Anim filetype - */ #define C233 1 -/** - * \brief c233 type for Anim filetype - */ #define YUVX 2 -/** - * \brief c233 type for Anim filetype - */ #define HAMX 3 -/** - * \brief c233 type for Anim filetype - */ #define TANX 4 -/** - * \brief Anim file of type c233 - */ #define AN_c233 (Anim | C233) -/** - * \brief Anim file of type YUVX - */ #define AN_yuvx (Anim | YUVX) -/** - * \brief Anim file of type HAMX - */ #define AN_hamx (Anim | HAMX) -/** - * \brief Anim file of type TANX - */ #define AN_tanx (Anim | TANX) +/**@}*/ -/** - * \brief Tests if an ImBuf is an Amiga file. - * \param x Must be an ImBuf* +/** \name Imbuf File Type Tests + * \brief These macros test if an ImBuf struct is the corresponding file type. */ +/**@{*/ +/** \brief Tests the ImBuf.ftype variable for the file format. */ #define IS_amiga(x) (x->ftype & AMI) -/** - * \brief Tests if an ImBuf is a ham file. - * \param x Must be an ImBuf* - */ #define IS_ham(x) ((x->ftype & AM_ham) == AM_ham) -/** - * \brief Tests if an ImBuf is an hbrite file. - * \param x Must be an ImBuf* - */ #define IS_hbrite(x) ((x->ftype & AM_hbrite) == AM_hbrite) -/** - * \brief Tests if an ImBuf is an Anim file. - * \param x Must be an ImBuf* - */ #define IS_anim(x) (x->ftype & Anim) -/** - * \brief Tests if an ImBuf is an Anim hamx. - * \param x Must be an ImBuf* - */ #define IS_hamx(x) (x->ftype == AN_hamx) -/** - * \brief Tests if an ImBuf is a tga file. - * \param x Must be an ImBuf* - */ #define IS_tga(x) (x->ftype & TGA) -/** - * \brief Tests if an ImBuf is a png file. - * \param x Must be an ImBuf* - */ #define IS_png(x) (x->ftype & PNG) -/** - * \brief Tests if an ImBuf is a bmp file. - * \param x Must be an ImBuf* - */ #define IS_bmp(x) (x->ftype & BMP) -/** - * \brief Iris filetype. - */ #define IMAGIC 0732 -/** - * \brief Tests if an ImBuf is an Iris file. - * \param x Must be an ImBuf* - */ #define IS_iris(x) (x->ftype == IMAGIC) -/** - * \brief Tests if an ImBuf is a JPEG file. - * \param x Must be an ImBuf* - */ -#define IS_jpg(x) (x->ftype & JPG) -/** - * \brief Tests if an ImBuf is a standard JPEG file. - * \param x Must be an ImBuf* - */ #define IS_stdjpg(x) ((x->ftype & JPG_MSK) == JPG_STD) -/** - * \brief Tests if an ImBuf is a video JPEG file. - * \param x Must be an ImBuf* - */ #define IS_vidjpg(x) ((x->ftype & JPG_MSK) == JPG_VID) -/** - * \brief Tests if an ImBuf is a jst JPEG file. - * \param x Must be an ImBuf* - */ #define IS_jstjpg(x) ((x->ftype & JPG_MSK) == JPG_JST) -/** - * \brief Tests if an ImBuf is a max JPEG file. - * \param x Must be an ImBuf* - */ #define IS_maxjpg(x) ((x->ftype & JPG_MSK) == JPG_MAX) +/**@}*/ #endif + + -- cgit v1.2.3