Hopfully fixed the readability issue by using distributed group docs.
This commit is contained in:
@@ -41,6 +41,12 @@
|
|||||||
*
|
*
|
||||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
* ***** 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
|
#ifndef IMB_IMBUF_TYPES_H
|
||||||
#define IMB_IMBUF_TYPES_H
|
#define IMB_IMBUF_TYPES_H
|
||||||
@@ -58,8 +64,8 @@ struct Mdec;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef struct ImBuf{
|
typedef struct ImBuf{
|
||||||
short x; /**< Width in pixels */
|
/** Width in pixels */
|
||||||
short y; /**< Height in scanlines */
|
short x, y; /**< Height in scanlines */
|
||||||
short skipx; /**< Width in ints to get to the next scanline */
|
short skipx; /**< Width in ints to get to the next scanline */
|
||||||
unsigned char depth; /**< Active amount of bits/bitplanes */
|
unsigned char depth; /**< Active amount of bits/bitplanes */
|
||||||
unsigned char cbits; /**< Amount of active bits in cmap */
|
unsigned char cbits; /**< Amount of active bits in cmap */
|
||||||
@@ -72,16 +78,16 @@ typedef struct ImBuf{
|
|||||||
unsigned int **planes; /**< bitplanes */
|
unsigned int **planes; /**< bitplanes */
|
||||||
int flags; /**< Controls which components should exist. */
|
int flags; /**< Controls which components should exist. */
|
||||||
int mall; /**< what is malloced internal, and can be freed */
|
int mall; /**< what is malloced internal, and can be freed */
|
||||||
short xorig; /**< X origin. What is this relative to? */
|
/** X origin. What is this relative to? */
|
||||||
short yorig; /**< Y origin. What is this relative to? */
|
short xorig, yorig; /**< Y origin. What is this relative to? */
|
||||||
char name[1023]; /**< The file name */
|
char name[1023]; /**< The file name */
|
||||||
char namenull; /**< What does this do?*/
|
char namenull; /**< What does this do?*/
|
||||||
int userflags; /**< What does this do? Holds an enum ImBuf_userflagsMask?*/
|
int userflags; /**< What does this do? Holds an enum ImBuf_userflagsMask?*/
|
||||||
int *zbuf; /**< A z buffer */
|
int *zbuf; /**< A z buffer */
|
||||||
void *userdata; /**< What does this do?*/
|
void *userdata; /**< What does this do?*/
|
||||||
unsigned char *encodedbuffer; /** What is an encoded buffer? */
|
unsigned char *encodedbuffer; /**< Does encoded mean compressed? */
|
||||||
unsigned int encodedsize; /** What is an encoded buffer? */
|
unsigned int encodedsize; /**< Compressed size?? */
|
||||||
unsigned int encodedbuffersize; /** What is an encoded buffer? */
|
unsigned int encodedbuffersize; /**< Uncompressed size?? */
|
||||||
} ImBuf;
|
} ImBuf;
|
||||||
|
|
||||||
/* Moved from BKE_bmfont_types.h because it is a userflag bit mask. */
|
/* Moved from BKE_bmfont_types.h because it is a userflag bit mask. */
|
||||||
@@ -101,240 +107,99 @@ typedef enum {
|
|||||||
* on. */
|
* 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)
|
#define IB_rect (1 << 0)
|
||||||
/**
|
|
||||||
* \brief Bitmap Planes flag
|
|
||||||
*/
|
|
||||||
#define IB_planes (1 << 1)
|
#define IB_planes (1 << 1)
|
||||||
/**
|
|
||||||
* \brief Color map flag
|
|
||||||
*/
|
|
||||||
#define IB_cmap (1 << 2)
|
#define IB_cmap (1 << 2)
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Vertex flag
|
|
||||||
*/
|
|
||||||
#define IB_vert (1 << 4)
|
#define IB_vert (1 << 4)
|
||||||
/**
|
|
||||||
* \brief Free Memory flag
|
|
||||||
*/
|
|
||||||
#define IB_freem (1 << 6)
|
#define IB_freem (1 << 6)
|
||||||
/**
|
|
||||||
* \brief Test flag
|
|
||||||
*/
|
|
||||||
#define IB_test (1 << 7)
|
#define IB_test (1 << 7)
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief True Type object??
|
|
||||||
*/
|
|
||||||
#define IB_ttob (1 << 8)
|
#define IB_ttob (1 << 8)
|
||||||
#define IB_subdlta (1 << 9)
|
#define IB_subdlta (1 << 9)
|
||||||
/**
|
|
||||||
* \brief Video fields flag
|
|
||||||
*/
|
|
||||||
#define IB_fields (1 << 11)
|
#define IB_fields (1 << 11)
|
||||||
/**
|
|
||||||
* \brief Zbuffer flag
|
|
||||||
*/
|
|
||||||
#define IB_zbuf (1 << 13)
|
#define IB_zbuf (1 << 13)
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Memory flag?
|
|
||||||
*/
|
|
||||||
#define IB_mem (1 << 14)
|
#define IB_mem (1 << 14)
|
||||||
|
/**@}*/
|
||||||
|
|
||||||
/**
|
/** \name imbuf_formats Image file formats
|
||||||
* \brief .ami (amiga) filetype
|
* \brief These defines are bit flags for the various image file formats.
|
||||||
|
*/
|
||||||
|
/**@{*/
|
||||||
|
/** \brief Identifier for an image file format.
|
||||||
|
*
|
||||||
|
* The bit flag is stored in the ImBuf.ftype variable.
|
||||||
*/
|
*/
|
||||||
#define AMI (1 << 31)
|
#define AMI (1 << 31)
|
||||||
/**
|
|
||||||
* \brief .png filetype
|
|
||||||
*/
|
|
||||||
#define PNG (1 << 30)
|
#define PNG (1 << 30)
|
||||||
/**
|
|
||||||
* \brief .??? (Anim) filetype
|
|
||||||
*/
|
|
||||||
#define Anim (1 << 29)
|
#define Anim (1 << 29)
|
||||||
/**
|
|
||||||
* \brief .tga (targa) filetype
|
|
||||||
*/
|
|
||||||
#define TGA (1 << 28)
|
#define TGA (1 << 28)
|
||||||
/**
|
|
||||||
* \brief .jpg (JPEG) filetype
|
|
||||||
*/
|
|
||||||
#define JPG (1 << 27)
|
#define JPG (1 << 27)
|
||||||
/**
|
|
||||||
* \brief .bmp filetype
|
|
||||||
*/
|
|
||||||
#define BMP (1 << 26)
|
#define BMP (1 << 26)
|
||||||
#ifdef WITH_QUICKTIME
|
#ifdef WITH_QUICKTIME
|
||||||
/**
|
|
||||||
* \brief .mov? (Quicktime) filetype
|
|
||||||
*/
|
|
||||||
#define QUICKTIME (1 << 25)
|
#define QUICKTIME (1 << 25)
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_FREEIMAGE
|
#ifdef WITH_FREEIMAGE
|
||||||
/**
|
|
||||||
* \brief .??? (Freeimage) filetype
|
|
||||||
*/
|
|
||||||
#define FREEIMAGE (1 << 24)
|
#define FREEIMAGE (1 << 24)
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_IMAGEMAGICK
|
#ifdef WITH_IMAGEMAGICK
|
||||||
/**
|
|
||||||
* \brief .im? (ImageMagick) filetype
|
|
||||||
*/
|
|
||||||
#define IMAGEMAGICK (1 << 23)
|
#define IMAGEMAGICK (1 << 23)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief tga of type "raw"
|
|
||||||
*/
|
|
||||||
#define RAWTGA (TGA | 1)
|
#define RAWTGA (TGA | 1)
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief jpg of type "standard"?
|
|
||||||
*/
|
|
||||||
#define JPG_STD (JPG | (0 << 8))
|
#define JPG_STD (JPG | (0 << 8))
|
||||||
/**
|
|
||||||
* \brief jpg of type "video"?
|
|
||||||
*/
|
|
||||||
#define JPG_VID (JPG | (1 << 8))
|
#define JPG_VID (JPG | (1 << 8))
|
||||||
/**
|
|
||||||
* \brief jpg of type "jst"?
|
|
||||||
*/
|
|
||||||
#define JPG_JST (JPG | (2 << 8))
|
#define JPG_JST (JPG | (2 << 8))
|
||||||
/**
|
|
||||||
* \brief jpg of type "max"?
|
|
||||||
*/
|
|
||||||
#define JPG_MAX (JPG | (3 << 8))
|
#define JPG_MAX (JPG | (3 << 8))
|
||||||
/**
|
|
||||||
* \brief Masks off the last two bytes.
|
|
||||||
*/
|
|
||||||
#define JPG_MSK (0xffffff00)
|
#define JPG_MSK (0xffffff00)
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief .ham? Anim filetype
|
|
||||||
*/
|
|
||||||
#define AM_ham (0x0800 | AMI)
|
#define AM_ham (0x0800 | AMI)
|
||||||
/**
|
|
||||||
* \brief .??? Anim filetype
|
|
||||||
*/
|
|
||||||
#define AM_hbrite (0x0080 | AMI)
|
#define AM_hbrite (0x0080 | AMI)
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief c233 type for Anim filetype
|
|
||||||
*/
|
|
||||||
#define C233 1
|
#define C233 1
|
||||||
/**
|
|
||||||
* \brief c233 type for Anim filetype
|
|
||||||
*/
|
|
||||||
#define YUVX 2
|
#define YUVX 2
|
||||||
/**
|
|
||||||
* \brief c233 type for Anim filetype
|
|
||||||
*/
|
|
||||||
#define HAMX 3
|
#define HAMX 3
|
||||||
/**
|
|
||||||
* \brief c233 type for Anim filetype
|
|
||||||
*/
|
|
||||||
#define TANX 4
|
#define TANX 4
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Anim file of type c233
|
|
||||||
*/
|
|
||||||
#define AN_c233 (Anim | C233)
|
#define AN_c233 (Anim | C233)
|
||||||
/**
|
|
||||||
* \brief Anim file of type YUVX
|
|
||||||
*/
|
|
||||||
#define AN_yuvx (Anim | YUVX)
|
#define AN_yuvx (Anim | YUVX)
|
||||||
/**
|
|
||||||
* \brief Anim file of type HAMX
|
|
||||||
*/
|
|
||||||
#define AN_hamx (Anim | HAMX)
|
#define AN_hamx (Anim | HAMX)
|
||||||
/**
|
|
||||||
* \brief Anim file of type TANX
|
|
||||||
*/
|
|
||||||
#define AN_tanx (Anim | TANX)
|
#define AN_tanx (Anim | TANX)
|
||||||
|
/**@}*/
|
||||||
|
|
||||||
/**
|
/** \name Imbuf File Type Tests
|
||||||
* \brief Tests if an ImBuf is an Amiga file.
|
* \brief These macros test if an ImBuf struct is the corresponding file type.
|
||||||
* \param x Must be an ImBuf*
|
|
||||||
*/
|
*/
|
||||||
|
/**@{*/
|
||||||
|
/** \brief Tests the ImBuf.ftype variable for the file format. */
|
||||||
#define IS_amiga(x) (x->ftype & AMI)
|
#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)
|
#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)
|
#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)
|
#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)
|
#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)
|
#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)
|
#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)
|
#define IS_bmp(x) (x->ftype & BMP)
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Iris filetype.
|
|
||||||
*/
|
|
||||||
#define IMAGIC 0732
|
#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)
|
#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)
|
#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)
|
#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)
|
#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)
|
#define IS_maxjpg(x) ((x->ftype & JPG_MSK) == JPG_MAX)
|
||||||
|
/**@}*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user