summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-12-17 23:44:45 -0500
committerTavian Barnes <tavianator@gmail.com>2011-12-17 23:44:45 -0500
commitbabba43cd4d1b9c92a569f19acbe17e429193b01 (patch)
tree5a66cee024ee2d51afefbc74e095e5f79f2c4f51 /libdimension
parent4dde640671a8278ff6c41ef21f03ba351828009c (diff)
downloaddimension-babba43cd4d1b9c92a569f19acbe17e429193b01.tar.xz
Add dmnsn_tcolor printf macros.
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/dimension/tcolor.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libdimension/dimension/tcolor.h b/libdimension/dimension/tcolor.h
index d1b7338..5ccec3b 100644
--- a/libdimension/dimension/tcolor.h
+++ b/libdimension/dimension/tcolor.h
@@ -30,6 +30,11 @@ typedef struct dmnsn_tcolor {
double F; /**< Proportion of filtered transparency. */
} dmnsn_tcolor;
+/** A standard format string for colors. */
+#define DMNSN_TCOLOR_FORMAT "TColor<%g, %g, %g, %g, %g>"
+/** The appropriate arguements to printf() a color. */
+#define DMNSN_TCOLOR_PRINTF(tc) (tc).c.R, (tc).c.G, (tc).c.B, (tc).T, (tc).F
+
/** Create a tcolor. */
DMNSN_INLINE dmnsn_tcolor
dmnsn_new_tcolor(dmnsn_color c, double T, double F)