Commit 319a87c8 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Take into account the DIB rectangles when determining overlap for blits.

parent 90f93e38
......@@ -438,11 +438,11 @@ static int get_overlap( const dib_info *dst, const RECT *dst_rect,
int height, ret = 0;
if (dst->stride != src->stride) return 0; /* can't be the same dib */
if (dst_rect->right <= src_rect->left) return 0;
if (dst_rect->left >= src_rect->right) return 0;
if (dst->rect.left + dst_rect->right <= src->rect.left + src_rect->left) return 0;
if (dst->rect.left + dst_rect->left >= src->rect.left + src_rect->right) return 0;
src_top = (const char *)src->bits.ptr + src_rect->top * src->stride;
dst_top = (const char *)dst->bits.ptr + dst_rect->top * dst->stride;
src_top = (const char *)src->bits.ptr + (src->rect.top + src_rect->top) * src->stride;
dst_top = (const char *)dst->bits.ptr + (dst->rect.top + dst_rect->top) * dst->stride;
height = (dst_rect->bottom - dst_rect->top) * dst->stride;
if (dst->stride > 0)
......@@ -460,8 +460,8 @@ static int get_overlap( const dib_info *dst, const RECT *dst_rect,
else if (dst_top < src_top) ret |= OVERLAP_BELOW;
}
if (dst_rect->left < src_rect->left) ret |= OVERLAP_LEFT;
else if (dst_rect->left > src_rect->left) ret |= OVERLAP_RIGHT;
if (dst->rect.left + dst_rect->left < src->rect.left + src_rect->left) ret |= OVERLAP_LEFT;
else if (dst->rect.left + dst_rect->left > src->rect.left + src_rect->left) ret |= OVERLAP_RIGHT;
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment