From dd9340af96fc2b6303b3279152dc3601216314ad Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Sat, 23 Feb 2008 18:42:19 +0000 Subject: [PATCH] adjust blit w/h if patch x/y are negative --- tools/cleanroom/images.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/cleanroom/images.py b/tools/cleanroom/images.py index 46ec5237..689b1ba3 100644 --- a/tools/cleanroom/images.py +++ b/tools/cleanroom/images.py @@ -61,7 +61,10 @@ class ImagesExample: 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 + if x < 0: + dest_width += x + if y < 0: + dest_height += y offset_x = x offset_y = y