diff options
Diffstat (limited to 'libdimension/dimension/pigment.h')
-rw-r--r-- | libdimension/dimension/pigment.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libdimension/dimension/pigment.h b/libdimension/dimension/pigment.h index 896c0bc..8b3ce4b 100644 --- a/libdimension/dimension/pigment.h +++ b/libdimension/dimension/pigment.h @@ -55,6 +55,9 @@ struct dmnsn_pigment { /** Generic pointer. */ void *ptr; + + dmnsn_refcount refcount; /** @internal Reference count. */ + bool initialized; /** @internal Whether the pigment is initialized. */ }; /** @@ -76,3 +79,12 @@ void dmnsn_delete_pigment(dmnsn_pigment *pigment); * @param[in,out] pigment The pigment to initialize. */ void dmnsn_initialize_pigment(dmnsn_pigment *pigment); + +/** + * Evaluate the color of a pigment at a point. + * @param[in] pigment The pigment to evaluate. + * @param[in] v The point to color. + * @return The color at \p v. + */ +dmnsn_color dmnsn_evaluate_pigment(const dmnsn_pigment *pigment, + dmnsn_vector v); |