From 12d6d8ce022bfd200ad5e101db3db359cf383103 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Sat, 23 Feb 2008 18:34:17 +0000 Subject: [PATCH] fix warnings, rendering still buggy though --- tools/cleanroom/images.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/cleanroom/images.py b/tools/cleanroom/images.py index 43363f61..46ec5237 100644 --- a/tools/cleanroom/images.py +++ b/tools/cleanroom/images.py @@ -56,8 +56,9 @@ class ImagesExample: image.set_from_pixbuf(baseimage.get_pixbuf().copy()) image.show() - dest_x = x - dest_y = y + # dest_x >= 0 && dest_x + dest_width <= dest->width + dest_x = max(0, x) + dest_y = max(0, y) dest_height = min(pb.get_height(), image.get_pixbuf().get_height() - dest_y) dest_width = min(pb.get_width(), image.get_pixbuf().get_width() - dest_x) dest_x + dest_width