summaryrefslogtreecommitdiffstats
path: root/libdimension/solid_pigment.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-11-08 16:10:40 -0500
committerTavian Barnes <tavianator@gmail.com>2010-11-08 16:10:40 -0500
commita76d4f1fb96633e7f348ba6aa0c14b726e15e28e (patch)
treeaae8f28d884e7beca4441524c3a981c8340fde4f /libdimension/solid_pigment.c
parent1ae277f2094a21d93b1460bf466ff657201310c2 (diff)
downloaddimension-a76d4f1fb96633e7f348ba6aa0c14b726e15e28e.tar.xz
Add quick_color to pigments.
Diffstat (limited to 'libdimension/solid_pigment.c')
-rw-r--r--libdimension/solid_pigment.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/libdimension/solid_pigment.c b/libdimension/solid_pigment.c
index cc8310a..15ea86f 100644
--- a/libdimension/solid_pigment.c
+++ b/libdimension/solid_pigment.c
@@ -21,30 +21,11 @@
#include "dimension.h"
#include <stdlib.h>
-/* Solid color pigment callback */
-static dmnsn_color dmnsn_solid_pigment_fn(const dmnsn_pigment *pigment,
- dmnsn_vector v);
-
/* Create a solid color */
dmnsn_pigment *
dmnsn_new_solid_pigment(dmnsn_color color)
{
dmnsn_pigment *pigment = dmnsn_new_pigment();
-
- dmnsn_color *solid = dmnsn_malloc(sizeof(dmnsn_color));
- *solid = color;
-
- pigment->pigment_fn = &dmnsn_solid_pigment_fn;
- pigment->free_fn = &dmnsn_free;
- pigment->ptr = solid;
-
+ pigment->quick_color = color;
return pigment;
}
-
-/* Solid color callback */
-static dmnsn_color
-dmnsn_solid_pigment_fn(const dmnsn_pigment *pigment, dmnsn_vector v)
-{
- dmnsn_color *color = pigment->ptr;
- return *color;
-}