summaryrefslogtreecommitdiffstats
path: root/libdimension/pigment.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-12-14 19:27:22 -0500
committerTavian Barnes <tavianator@gmail.com>2011-12-14 19:52:36 -0500
commitbfbe9e43e108f6816c17b9b7764b75284ac78313 (patch)
tree189f85eeec18a76ccb626e45455fa7e45406db7c /libdimension/pigment.c
parent7db5342a36341b061a8785a3b349cf0fcad69ebf (diff)
downloaddimension-bfbe9e43e108f6816c17b9b7764b75284ac78313.tar.xz
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.
Diffstat (limited to 'libdimension/pigment.c')
-rw-r--r--libdimension/pigment.c4
1 files changed, 2 insertions, 2 deletions
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) {