Mercurial > hg > dmlib
diff tools/libgfx.h @ 2157:9a9493809b3a
Rename DM_COLFMT_* constants to DM_PIXFMT_* and the 'format' field of DMImage
and DMImageWriteSpec to 'pixfmt' to be more precise about their meaning.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 04 Jun 2019 16:27:09 +0300 |
parents | e6ec7fad9ce2 |
children | 455a3849b8ac |
line wrap: on
line diff
--- a/tools/libgfx.h Tue Jun 04 16:18:41 2019 +0300 +++ b/tools/libgfx.h Tue Jun 04 16:27:09 2019 +0300 @@ -34,12 +34,12 @@ // Color formats (these can be used along with DM_FMT_*) enum { - DM_COLFMT_PALETTE = 0x0010, - DM_COLFMT_GRAYSCALE = 0x0020, - DM_COLFMT_RGB = 0x0040, - DM_COLFMT_RGBA = 0x0080, + DM_PIXFMT_PALETTE = 0x0010, + DM_PIXFMT_GRAYSCALE = 0x0020, + DM_PIXFMT_RGB = 0x0040, + DM_PIXFMT_RGBA = 0x0080, - DM_COLFMT_ANY = 0x00f0, + DM_PIXFMT_ANY = 0x00f0, }; @@ -84,7 +84,7 @@ // Bitmapped image struct typedef struct { - int format; // one of types specified by DM_COLFMT_* + int pixfmt; // one of types specified by DM_PIXFMT_* int width, height; int pitch; // bytes per scanline int bpp; // bits per pixel @@ -102,7 +102,7 @@ typedef struct { int fmtid; // DM_IMGFMT_* of target format (a bit of a kludge here) - int format; // Target color format DM_COLFMT_* + int pixfmt; // Target color format DM_PIXFMT_* int scaleX, scaleY; // Integer scale factors (1..) int nplanes, bpp, mask; // number of planes, bits per PLANE, masking @@ -116,7 +116,7 @@ char *fext; char *name; int fmtid; // DM_IMGFMT_* - int flags; // DM_FMT_* and DM_COLFMT_* flags + int flags; // DM_FMT_* and DM_PIXFMT_* flags int (*probe)(const Uint8 *buf, const size_t len); int (*read)(DMResource *fp, DMImage **pimg); int (*write)(DMResource *fp, const DMImage *pimg, const DMImageWriteSpec *spec);