Fix off-by-one error in horizontal clipping when transforming images.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@18476 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2004-01-25 12:55:55 +00:00
parent 9e93daff9e
commit de74b30570
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2004-01-25 13:52 Alexander Malmberg <alexander@malmberg.org>
* Source/art/image.m (-_image_do_rgb_transform:::): Fix off-by-one
error in horizontal clipping.
2004-01-10 Adam Fedor <fedor@gnu.org>
* configure.ac: Check if XShm is really implemented (it isn't on

View file

@ -486,7 +486,7 @@ seem to cause edges to be off by a pixel
x0++;
}
}
if (x1 >= clip_x1) x1 = clip_x1 - 1; /* TODO? */
if (x1 > clip_x1) x1 = clip_x1;
ri.dst = wi->data + x0 * DI.bytes_per_pixel
+ cy * wi->bytes_per_line;
@ -570,7 +570,7 @@ seem to cause edges to be off by a pixel
}
- (void)DPSimage: (NSAffineTransform * ) matrix
- (void)DPSimage: (NSAffineTransform *) matrix
: (int) pixelsWide : (int) pixelsHigh
: (int) bitsPerSample : (int) samplesPerPixel
: (int) bitsPerPixel : (int) bytesPerRow : (BOOL) isPlanar
@ -620,7 +620,7 @@ seem to cause edges to be off by a pixel
}
else
alpha_dest = NULL;
ox = [matrix transformPoint: NSMakePoint(0, 0)].x;
oy = wi->sy - [matrix transformPoint: NSMakePoint(0, 0)].y - pixelsHigh;