gdiplus: Transform clipping region to gdi device coordinates.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Vincent Povirk 2017-08-30 12:32:14 -05:00 committed by Alexandre Julliard
parent c579661006
commit 016dc76ab2
2 changed files with 21 additions and 3 deletions

View file

@ -348,8 +348,26 @@ static void gdi_alpha_blend(GpGraphics *graphics, INT dst_x, INT dst_y, INT dst_
static GpStatus get_clip_hrgn(GpGraphics *graphics, HRGN *hrgn)
{
/* clipping region is in device coords */
return GdipGetRegionHRgn(graphics->clip, NULL, hrgn);
GpRegion *rgn;
GpMatrix transform;
GpStatus stat;
stat = get_graphics_transform(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceDevice, &transform);
if (stat == Ok)
stat = GdipCloneRegion(graphics->clip, &rgn);
if (stat == Ok)
{
stat = GdipTransformRegion(rgn, &transform);
if (stat == Ok)
stat = GdipGetRegionHRgn(rgn, NULL, hrgn);
GdipDeleteRegion(rgn);
}
return stat;
}
/* Draw ARGB data to the given graphics object */

View file

@ -6276,7 +6276,7 @@ static void test_GdipFillRectanglesOnMemoryDCSolidBrush(void)
color[5] = get_bitmap_pixel(width-1, height/2-1);
}
todo_wine ok(is_blue_color(color[0]) && is_blue_color(color[1]) && is_blue_color(color[2]) &&
ok(is_blue_color(color[0]) && is_blue_color(color[1]) && is_blue_color(color[2]) &&
color[3] == 0 && color[4] == 0 && color[5] == 0,
"Expected GdipFillRectangleI take effect!\n" );
ReleaseBitmapPixelBuffer(pixel);