diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-04-22 13:19:09 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-04-22 13:19:09 -0400 |
commit | 68e39815977c406b8ec39ee3e2fe975087b66303 (patch) | |
tree | 3eb5f109af2c21edf15bd83a336ce6a3e8720615 /dimension | |
parent | 1208ac55766e410f7cac3ad9d6cf588e7846ca64 (diff) | |
download | dimension-68e39815977c406b8ec39ee3e2fe975087b66303.tar.xz |
Make colors less abstract.
Diffstat (limited to 'dimension')
-rw-r--r-- | dimension/realize.c | 17 |
1 files changed, 5 insertions, 12 deletions
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 |