Fix imlib_create_scaled_image_from_drawable for source_y != 0.

SVN revision: 13567
This commit is contained in:
Kim Woelders 2005-03-02 21:33:49 +00:00
parent 9b33f633f5
commit 6600863e0d
1 changed files with 4 additions and 6 deletions

View File

@ -2247,8 +2247,8 @@ imlib_create_scaled_image_from_drawable(Pixmap mask, int source_x,
for (x = 0; x < destination_width; x++)
{
xx = (source_width * x) / destination_width;
XCopyArea(ctx->display, ctx->drawable, p, gc, source_x + xx, 0, 1,
source_height, x, 0);
XCopyArea(ctx->display, ctx->drawable, p, gc, source_x + xx, source_y,
1, source_height, x, 0);
if (m != None)
XCopyArea(ctx->display, mask, m, mgc, xx, 0, 1, source_height, x,
0);
@ -2256,11 +2256,9 @@ imlib_create_scaled_image_from_drawable(Pixmap mask, int source_x,
for (x = 0; x < destination_height; x++)
{
xx = (source_height * x) / destination_height;
XCopyArea(ctx->display, p, p, gc, 0, source_y + xx,
destination_width, 1, 0, x);
XCopyArea(ctx->display, p, p, gc, 0, xx, destination_width, 1, 0, x);
if (m != None)
XCopyArea(ctx->display, m, m, mgc, 0, source_y + xx,
destination_width, 1, 0, x);
XCopyArea(ctx->display, m, m, mgc, 0, xx, destination_width, 1, 0, x);
}
im = __imlib_CreateImage(destination_width, destination_height, NULL);
im->data = malloc(destination_width * destination_height * sizeof(DATA32));