summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-11-08 02:14:04 -0500
committerTavian Barnes <tavianator@gmail.com>2010-11-08 02:14:04 -0500
commit1ae277f2094a21d93b1460bf466ff657201310c2 (patch)
tree62ff87784b76c06287b6d71113cc9c9ec16d13c1
parent835a9bdcbd7365187954ab8a6453a2ab67008c2a (diff)
downloaddimension-1ae277f2094a21d93b1460bf466ff657201310c2.tar.xz
Fix default color_maps for pattern pigments.
-rw-r--r--dimension/realize.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dimension/realize.c b/dimension/realize.c
index c879a23..ab5f2a0 100644
--- a/dimension/realize.c
+++ b/dimension/realize.c
@@ -524,7 +524,6 @@ dmnsn_realize_pattern_pigment(dmnsn_astnode type, dmnsn_astnode modifiers)
"Expected pigment modifiers");
dmnsn_pattern *pattern = dmnsn_realize_pattern(type);
-
dmnsn_color_map *color_map = NULL;
/* Set up the color_map */
@@ -546,7 +545,11 @@ dmnsn_realize_pattern_pigment(dmnsn_astnode type, dmnsn_astnode modifiers)
}
/* Now add the default values */
- switch (type.type) {
+
+ dmnsn_astnode pattern_type;
+ dmnsn_array_get(type.children, 0, &pattern_type);
+
+ switch (pattern_type.type) {
case DMNSN_AST_CHECKER:
/* Default checker pattern is blue and green */
if (!color_map)