Commit 4edff21e authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Prefer to not use gdi32 for gradient and texture brushes.

parent 8a036abc
...@@ -578,6 +578,21 @@ static ARGB resample_bitmap_pixel(GDIPCONST GpRect *src_rect, LPBYTE bits, UINT ...@@ -578,6 +578,21 @@ static ARGB resample_bitmap_pixel(GDIPCONST GpRect *src_rect, LPBYTE bits, UINT
} }
} }
static INT brush_can_fill_path(GpBrush *brush)
{
switch (brush->bt)
{
case BrushTypeSolidColor:
case BrushTypeHatchFill:
return 1;
case BrushTypeLinearGradient:
case BrushTypeTextureFill:
/* Gdi32 isn't much help with these, so we should use brush_fill_pixels instead. */
default:
return 0;
}
}
static void brush_fill_path(GpGraphics *graphics, GpBrush* brush) static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
{ {
switch (brush->bt) switch (brush->bt)
...@@ -3745,7 +3760,7 @@ static GpStatus GDI32_GdipFillRegion(GpGraphics* graphics, GpBrush* brush, ...@@ -3745,7 +3760,7 @@ static GpStatus GDI32_GdipFillRegion(GpGraphics* graphics, GpBrush* brush,
HRGN hrgn; HRGN hrgn;
RECT rc; RECT rc;
if(!graphics->hdc) if(!graphics->hdc || !brush_can_fill_path(brush))
return NotImplemented; return NotImplemented;
status = GdipGetRegionHRgn(region, graphics, &hrgn); status = GdipGetRegionHRgn(region, graphics, &hrgn);
......
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