Jacek Caban : gdi32: Use NtGdiFillPath for FillPath.

Alexandre Julliard julliard at winehq.org
Wed Aug 18 16:22:09 CDT 2021


Module: wine
Branch: master
Commit: 6ce4ad23eb46e0492a28a85fdfc2f8ca8b925ecc
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=6ce4ad23eb46e0492a28a85fdfc2f8ca8b925ecc

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Aug 18 11:58:26 2021 +0200

gdi32: Use NtGdiFillPath for FillPath.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/enhmfdrv/graphics.c | 11 ++++++++++-
 dlls/gdi32/gdi_private.h       |  1 +
 dlls/gdi32/gdidc.c             | 12 ++++++++++++
 dlls/gdi32/path.c              |  7 ++-----
 4 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c
index eacf596c92b..0f48d6876dd 100644
--- a/dlls/gdi32/enhmfdrv/graphics.c
+++ b/dlls/gdi32/enhmfdrv/graphics.c
@@ -1180,7 +1180,16 @@ BOOL EMFDC_GradientFill( DC_ATTR *dc_attr, TRIVERTEX *vert_array, ULONG nvert,
  */
 BOOL CDECL EMFDRV_FillPath( PHYSDEV dev )
 {
-    return emfdrv_stroke_and_fill_path( dev, EMR_FILLPATH );
+    /* FIXME: update bound rect */
+    return TRUE;
+}
+
+/**********************************************************************
+ *	     EMFDC_FillPath
+ */
+BOOL EMFDC_FillPath( DC_ATTR *dc_attr )
+{
+    return emfdrv_stroke_and_fill_path( dc_attr->emf, EMR_FILLPATH );
 }
 
 /**********************************************************************
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
index b32bae5449d..0a894e9ec3d 100644
--- a/dlls/gdi32/gdi_private.h
+++ b/dlls/gdi32/gdi_private.h
@@ -147,6 +147,7 @@ extern BOOL EMFDC_ExtFloodFill( DC_ATTR *dc_attr, INT x, INT y, COLORREF color,
 extern BOOL EMFDC_ExtSelectClipRgn( DC_ATTR *dc_attr, HRGN hrgn, INT mode ) DECLSPEC_HIDDEN;
 extern BOOL EMFDC_ExtTextOut( DC_ATTR *dc_attr, INT x, INT y, UINT flags, const RECT *rect,
                               const WCHAR *str, UINT count, const INT *dx ) DECLSPEC_HIDDEN;
+extern BOOL EMFDC_FillPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
 extern BOOL EMFDC_FillRgn( DC_ATTR *dc_attr, HRGN hrgn, HBRUSH hbrush ) DECLSPEC_HIDDEN;
 extern BOOL EMFDC_FrameRgn( DC_ATTR *dc_attr, HRGN hrgn, HBRUSH hbrush, INT width,
                             INT height ) DECLSPEC_HIDDEN;
diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c
index 041cba83581..85744cc5c11 100644
--- a/dlls/gdi32/gdidc.c
+++ b/dlls/gdi32/gdidc.c
@@ -1519,6 +1519,18 @@ BOOL WINAPI CloseFigure( HDC hdc )
     return NtGdiCloseFigure( hdc );
 }
 
+/***********************************************************************
+ *           FillPath    (GDI32.@)
+ */
+BOOL WINAPI FillPath( HDC hdc )
+{
+    DC_ATTR *dc_attr;
+
+    if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
+    if (dc_attr->emf && !EMFDC_FillPath( dc_attr )) return FALSE;
+    return NtGdiFillPath( hdc );
+}
+
 /***********************************************************************
  *           IntersectClipRect    (GDI32.@)
  */
diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c
index fd8970f2929..54e93ca74db 100644
--- a/dlls/gdi32/path.c
+++ b/dlls/gdi32/path.c
@@ -696,12 +696,9 @@ HRGN WINAPI PathToRegion(HDC hdc)
 
 
 /***********************************************************************
- *           FillPath    (GDI32.@)
- *
- * FIXME
- *    Check that SetLastError is being called correctly
+ *           NtGdiFillPath    (win32u.@)
  */
-BOOL WINAPI FillPath(HDC hdc)
+BOOL WINAPI NtGdiFillPath( HDC hdc )
 {
     BOOL ret = FALSE;
     DC *dc = get_dc_ptr( hdc );




More information about the wine-cvs mailing list