From 18b89c6edc29a009b1419e6d34bc3eef2dd911b9 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 20 May 2011 18:59:18 -0600 Subject: Switch to Blender model of filtered transparency. --- libdimension/dimension/color.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libdimension/dimension') diff --git a/libdimension/dimension/color.h b/libdimension/dimension/color.h index 504ec47..be5dc3d 100644 --- a/libdimension/dimension/color.h +++ b/libdimension/dimension/color.h @@ -31,10 +31,8 @@ typedef struct { double G; /**< sRGB green value. */ double B; /**< sRGB blue value. */ - /** Filtered transparency. */ - double filter; - /** Unfiltered transparency; filter + trans should be <= 1. */ - double trans; + double trans; /**< Translucency. */ + double filter; /**< Degree of filtering. */ } dmnsn_color; /* Standard colors */ @@ -61,9 +59,9 @@ dmnsn_new_color(double R, double G, double B) /** Construct a new color with transparent components. */ DMNSN_INLINE dmnsn_color -dmnsn_new_color5(double R, double G, double B, double filter, double trans) +dmnsn_new_color5(double R, double G, double B, double trans, double filter) { - dmnsn_color ret = { R, G, B, filter, trans }; + dmnsn_color ret = { R, G, B, trans, filter }; return ret; } -- cgit v1.2.3