summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/pigment.h
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/dimension/pigment.h
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/dimension/pigment.h')
-rw-r--r--libdimension/dimension/pigment.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/libdimension/dimension/pigment.h b/libdimension/dimension/pigment.h
index 716c28b..176ff28 100644
--- a/libdimension/dimension/pigment.h
+++ b/libdimension/dimension/pigment.h
@@ -32,8 +32,8 @@ typedef struct dmnsn_pigment dmnsn_pigment;
* @param[in] v The point to color.
* @return The color of the pigment at \p v.
*/
-typedef dmnsn_color dmnsn_pigment_fn(const dmnsn_pigment *pigment,
- dmnsn_vector v);
+typedef dmnsn_tcolor dmnsn_pigment_fn(const dmnsn_pigment *pigment,
+ dmnsn_vector v);
/**
* Pigment initializer callback.
@@ -51,7 +51,7 @@ struct dmnsn_pigment {
dmnsn_matrix trans_inv; /**< The inverse of the transformation matrix. */
/** Quick color -- used for low-quality renders. */
- dmnsn_color quick_color;
+ dmnsn_tcolor quick_color;
/** Generic pointer. */
void *ptr;
@@ -86,5 +86,5 @@ void dmnsn_pigment_initialize(dmnsn_pigment *pigment);
* @param[in] v The point to color.
* @return The color at \p v.
*/
-dmnsn_color dmnsn_pigment_evaluate(const dmnsn_pigment *pigment,
- dmnsn_vector v);
+dmnsn_tcolor dmnsn_pigment_evaluate(const dmnsn_pigment *pigment,
+ dmnsn_vector v);