From bfbe9e43e108f6816c17b9b7764b75284ac78313 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 14 Dec 2011 19:27:22 -0500 Subject: Re-think colors. Color is a property of light, and thus doesn't include information about transparency. But canvas pixels and object pigments represent a color and a degree of transparency. The new type dmnsn_tcolor/ TColor encapsulates that information. Also, fix the transparent shadow implementation. --- libdimension/pigment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libdimension/pigment.c') diff --git a/libdimension/pigment.c b/libdimension/pigment.c index 74159ee..c518005 100644 --- a/libdimension/pigment.c +++ b/libdimension/pigment.c @@ -34,7 +34,7 @@ dmnsn_new_pigment(void) pigment->initialize_fn = NULL; pigment->free_fn = NULL; pigment->trans = dmnsn_identity_matrix(); - pigment->quick_color = dmnsn_black; + pigment->quick_color = DMNSN_TCOLOR(dmnsn_black); pigment->refcount = 1; pigment->initialized = false; return pigment; @@ -67,7 +67,7 @@ dmnsn_pigment_initialize(dmnsn_pigment *pigment) } /* Evaluate a pigment */ -dmnsn_color +dmnsn_tcolor dmnsn_pigment_evaluate(const dmnsn_pigment *pigment, dmnsn_vector v) { if (pigment->pigment_fn) { -- cgit v1.2.3