diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-09-12 19:45:22 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-09-12 19:45:22 -0400 |
commit | 15fdb4cbe1a4843db5ef3d86b18b059f949e1d89 (patch) | |
tree | c328c5703cd90f3879e12a57581e4821a15d8f6a /libdimension/dimension | |
parent | 518ca437265923932587ea257110e19c00f6e29a (diff) | |
download | dimension-15fdb4cbe1a4843db5ef3d86b18b059f949e1d89.tar.xz |
Add dmnsn_color printf macros.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r-- | libdimension/dimension/color.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libdimension/dimension/color.h b/libdimension/dimension/color.h index 479e4ba..ecf7005 100644 --- a/libdimension/dimension/color.h +++ b/libdimension/dimension/color.h @@ -27,14 +27,20 @@ /** A color value. */ typedef struct { - double R; /**< sRGB red value. */ - double G; /**< sRGB green value. */ - double B; /**< sRGB blue value. */ + double R; /**< Red. */ + double G; /**< Green. */ + double B; /**< Blue. */ double trans; /**< Transparency. */ double filter; /**< Degree of filtering. */ } dmnsn_color; +/** A standard format string for colors. */ +#define DMNSN_COLOR_FORMAT \ + "<red = %g, green = %g, blue = %g, trans = %g, filter = %g>" +/** The appropriate arguements to printf() a color. */ +#define DMNSN_COLOR_PRINTF(c) (c).R, (c).G, (c).B, (c).trans, (c).filter + /* Standard colors */ extern const dmnsn_color dmnsn_black; /**< Black. */ extern const dmnsn_color dmnsn_white; /**< White. */ |