[GDIPLUS] Sync with Wine Staging 3.17. CORE-15127

This commit is contained in:
Amine Khaldi 2018-10-01 12:50:25 +01:00
parent fe0fd16499
commit 8d2e1e843c
2 changed files with 28 additions and 8 deletions

View file

@ -1156,8 +1156,9 @@ static BOOL brush_can_fill_path(GpBrush *brush, BOOL is_fill)
}
}
static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
static GpStatus brush_fill_path(GpGraphics *graphics, GpBrush *brush)
{
GpStatus status = Ok;
switch (brush->bt)
{
case BrushTypeSolidColor:
@ -1170,12 +1171,22 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
RECT rc;
/* partially transparent fill */
SelectClipPath(graphics->hdc, RGN_AND);
if (!SelectClipPath(graphics->hdc, RGN_AND))
{
status = GenericError;
DeleteObject(bmp);
break;
}
if (GetClipBox(graphics->hdc, &rc) != NULLREGION)
{
HDC hdc = CreateCompatibleDC(NULL);
if (!hdc) break;
if (!hdc)
{
status = OutOfMemory;
DeleteObject(bmp);
break;
}
SelectObject(hdc, bmp);
gdi_alpha_blend(graphics, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
@ -1193,7 +1204,11 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
HBRUSH gdibrush, old_brush;
gdibrush = create_gdi_brush(brush);
if (!gdibrush) return;
if (!gdibrush)
{
status = OutOfMemory;
break;
}
old_brush = SelectObject(graphics->hdc, gdibrush);
FillPath(graphics->hdc);
@ -1202,6 +1217,8 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
break;
}
}
return status;
}
static BOOL brush_can_fill_pixels(GpBrush *brush)
@ -4337,7 +4354,7 @@ static GpStatus GDI32_GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath
if(retval == Ok)
{
EndPath(graphics->hdc);
brush_fill_path(graphics, brush);
retval = brush_fill_path(graphics, brush);
}
gdi_transform_release(graphics);
@ -4383,6 +4400,9 @@ GpStatus WINGDIPAPI GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *p
if(graphics->busy)
return ObjectBusy;
if (!path->pathdata.Count)
return Ok;
if (graphics->image && graphics->image->type == ImageTypeMetafile)
return METAFILE_FillPath((GpMetafile*)graphics->image, brush, path);
@ -4643,13 +4663,13 @@ static GpStatus GDI32_GdipFillRegion(GpGraphics* graphics, GpBrush* brush,
Rectangle(graphics->hdc, rc.left, rc.top, rc.right, rc.bottom);
EndPath(graphics->hdc);
brush_fill_path(graphics, brush);
status = brush_fill_path(graphics, brush);
}
RestoreDC(graphics->hdc, save_state);
return Ok;
return status;
}
static GpStatus SOFTWARE_GdipFillRegion(GpGraphics *graphics, GpBrush *brush,

View file

@ -68,7 +68,7 @@ reactos/dll/win32/dciman32 # Synced to WineStaging-3.3
reactos/dll/win32/faultrep # Synced to WineStaging-2.9
reactos/dll/win32/fontsub # Synced to WineStaging-2.9
reactos/dll/win32/fusion # Synced to WineStaging-3.17
reactos/dll/win32/gdiplus # Synced to WineStaging-3.9
reactos/dll/win32/gdiplus # Synced to WineStaging-3.17
reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.3
reactos/dll/win32/hlink # Synced to WineStaging-3.3
reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9