gdi32: Make GdiTransparentBlt clipping aware (try2)

Alexandre Julliard julliard at winehq.org
Tue Jul 5 07:39:45 CDT 2011


Piotr Caban <piotr at codeweavers.com> writes:

> @@ -392,6 +394,15 @@ BOOL WINAPI GdiTransparentBlt( HDC hdcDest, int xDest, int yDest, int widthDest,
>      hdcWork = CreateCompatibleDC(hdcDest);
>      bmpWork = CreateCompatibleBitmap(hdcDest, widthDest, heightDest);
>      oldWork = SelectObject(hdcWork, bmpWork);
> +    use_clip_rect = GetClipBox(hdcDest, &clip_rect);
> +    if(use_clip_rect) {
> +        clip_rect.left -= xDest;
> +        clip_rect.top -= yDest;
> +        clip_rect.right -= xDest;
> +        clip_rect.bottom -= yDest;
> +        IntersectClipRect(hdcWork, clip_rect.left, clip_rect.top, clip_rect.right, clip_rect.bottom);
> +    }

You need to handle logical coordinates mapping.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list