mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 20:18:22 +00:00
[GDIPLUS] Sync with Wine Staging 3.17. CORE-15127
This commit is contained in:
parent
fe0fd16499
commit
8d2e1e843c
2 changed files with 28 additions and 8 deletions
|
@ -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)
|
switch (brush->bt)
|
||||||
{
|
{
|
||||||
case BrushTypeSolidColor:
|
case BrushTypeSolidColor:
|
||||||
|
@ -1170,12 +1171,22 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
|
||||||
RECT rc;
|
RECT rc;
|
||||||
/* partially transparent fill */
|
/* 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)
|
if (GetClipBox(graphics->hdc, &rc) != NULLREGION)
|
||||||
{
|
{
|
||||||
HDC hdc = CreateCompatibleDC(NULL);
|
HDC hdc = CreateCompatibleDC(NULL);
|
||||||
|
|
||||||
if (!hdc) break;
|
if (!hdc)
|
||||||
|
{
|
||||||
|
status = OutOfMemory;
|
||||||
|
DeleteObject(bmp);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
SelectObject(hdc, bmp);
|
SelectObject(hdc, bmp);
|
||||||
gdi_alpha_blend(graphics, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
|
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;
|
HBRUSH gdibrush, old_brush;
|
||||||
|
|
||||||
gdibrush = create_gdi_brush(brush);
|
gdibrush = create_gdi_brush(brush);
|
||||||
if (!gdibrush) return;
|
if (!gdibrush)
|
||||||
|
{
|
||||||
|
status = OutOfMemory;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
old_brush = SelectObject(graphics->hdc, gdibrush);
|
old_brush = SelectObject(graphics->hdc, gdibrush);
|
||||||
FillPath(graphics->hdc);
|
FillPath(graphics->hdc);
|
||||||
|
@ -1202,6 +1217,8 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL brush_can_fill_pixels(GpBrush *brush)
|
static BOOL brush_can_fill_pixels(GpBrush *brush)
|
||||||
|
@ -4337,7 +4354,7 @@ static GpStatus GDI32_GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath
|
||||||
if(retval == Ok)
|
if(retval == Ok)
|
||||||
{
|
{
|
||||||
EndPath(graphics->hdc);
|
EndPath(graphics->hdc);
|
||||||
brush_fill_path(graphics, brush);
|
retval = brush_fill_path(graphics, brush);
|
||||||
}
|
}
|
||||||
|
|
||||||
gdi_transform_release(graphics);
|
gdi_transform_release(graphics);
|
||||||
|
@ -4383,6 +4400,9 @@ GpStatus WINGDIPAPI GdipFillPath(GpGraphics *graphics, GpBrush *brush, GpPath *p
|
||||||
if(graphics->busy)
|
if(graphics->busy)
|
||||||
return ObjectBusy;
|
return ObjectBusy;
|
||||||
|
|
||||||
|
if (!path->pathdata.Count)
|
||||||
|
return Ok;
|
||||||
|
|
||||||
if (graphics->image && graphics->image->type == ImageTypeMetafile)
|
if (graphics->image && graphics->image->type == ImageTypeMetafile)
|
||||||
return METAFILE_FillPath((GpMetafile*)graphics->image, brush, path);
|
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);
|
Rectangle(graphics->hdc, rc.left, rc.top, rc.right, rc.bottom);
|
||||||
EndPath(graphics->hdc);
|
EndPath(graphics->hdc);
|
||||||
|
|
||||||
brush_fill_path(graphics, brush);
|
status = brush_fill_path(graphics, brush);
|
||||||
}
|
}
|
||||||
|
|
||||||
RestoreDC(graphics->hdc, save_state);
|
RestoreDC(graphics->hdc, save_state);
|
||||||
|
|
||||||
|
|
||||||
return Ok;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GpStatus SOFTWARE_GdipFillRegion(GpGraphics *graphics, GpBrush *brush,
|
static GpStatus SOFTWARE_GdipFillRegion(GpGraphics *graphics, GpBrush *brush,
|
||||||
|
|
|
@ -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/faultrep # Synced to WineStaging-2.9
|
||||||
reactos/dll/win32/fontsub # 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/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/hhctrl.ocx # Synced to WineStaging-3.3
|
||||||
reactos/dll/win32/hlink # Synced to WineStaging-3.3
|
reactos/dll/win32/hlink # Synced to WineStaging-3.3
|
||||||
reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9
|
reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9
|
||||||
|
|
Loading…
Reference in a new issue