summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-02-11 19:36:12 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-02-11 19:36:12 +0000
commitaee113f36e4cff8bc7cca37ea5533a4e8f160a23 (patch)
treee63e700d3f3b8d237e223dee4156120e09b5e290 /gdk-pixbuf
parenta02011395c01edfe4e73515b126cd36159feea11 (diff)
downloadgdk-pixbuf-aee113f36e4cff8bc7cca37ea5533a4e8f160a23.tar.gz
Fix handing of overall alpha.
Mon Feb 11 14:31:53 2002 Owen Taylor <otaylor@redhat.com> * pixops/pixops.c (bilinear_make_weights): Fix handing of overall alpha.
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/pixops/pixops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
index 12ba7f754..0bcbcec01 100644
--- a/gdk-pixbuf/pixops/pixops.c
+++ b/gdk-pixbuf/pixops/pixops.c
@@ -1144,7 +1144,7 @@ tile_make_weights (PixopsFilter *filter, double x_scale, double y_scale, double
*(pixel_weights + n_x * i + j) = weight;
}
- *(pixel_weights + n_x * n_y - 1) += 65536 - total;
+ *(pixel_weights + n_x * n_y - 1) += (int)(0.5 + 65536 * overall_alpha) - total;
}
}
}
@@ -1266,7 +1266,7 @@ bilinear_make_fast_weights (PixopsFilter *filter, double x_scale, double y_scale
total += weight;
}
- *(pixel_weights + n_x * n_y - 1) += 65536 - total;
+ *(pixel_weights + n_x * n_y - 1) += (int)(0.5 + 65536 * overall_alpha) - total;
}
g_free (x_weights);
@@ -1368,7 +1368,7 @@ bilinear_make_weights (PixopsFilter *filter, double x_scale, double y_scale, dou
total += weight;
}
- *(pixel_weights + n_x * n_y - 1) += 65536 - total;
+ *(pixel_weights + n_x * n_y - 1) += (int)(0.5 + 65536 * overall_alpha) - total;
}
}