From 68e39815977c406b8ec39ee3e2fe975087b66303 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 22 Apr 2011 13:19:09 -0400 Subject: Make colors less abstract. --- dimension/realize.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'dimension/realize.c') diff --git a/dimension/realize.c b/dimension/realize.c index 019011e..2603ba1 100644 --- a/dimension/realize.c +++ b/dimension/realize.c @@ -98,18 +98,11 @@ dmnsn_realize_color(dmnsn_astnode astnode) dmnsn_array_get(astnode.children, 3, &fnode); dmnsn_array_get(astnode.children, 4, &tnode); - double r = dmnsn_realize_float(rnode), - g = dmnsn_realize_float(gnode), - b = dmnsn_realize_float(bnode), - f = dmnsn_realize_float(fnode), - t = dmnsn_realize_float(tnode); - - dmnsn_sRGB sRGB = { .R = r, .G = g, .B = b }; - dmnsn_color color = dmnsn_color_from_sRGB(sRGB); - color.filter = f; - color.trans = t; - - return color; + return dmnsn_new_color5(dmnsn_realize_float(rnode), + dmnsn_realize_float(gnode), + dmnsn_realize_float(bnode), + dmnsn_realize_float(fnode), + dmnsn_realize_float(tnode)); } static dmnsn_matrix -- cgit v1.2.3