Updated gdi32-rotation patchset

Fixed compile error, passing incompatible types.
This commit is contained in:
Alistair Leslie-Hughes 2024-07-02 08:03:30 +10:00
parent 79dd235833
commit d1f022f686

View File

@ -1,18 +1,24 @@
From 5dcb80fe0d35101804bb978e507e6db361a949af Mon Sep 17 00:00:00 2001
From fdc9d34400af31765d20ca7b070e53d7eec710e4 Mon Sep 17 00:00:00 2001
From: Daniel Wendt <daniel.wendt@linux.com>
Date: Tue, 10 Dec 2013 14:55:32 +0100
Subject: [PATCH] gdi32: fix for rotated ellipse
Bug: http://bugs.winehq.org/show_bug.cgi?id=35331
---
dlls/win32u/dibdrv/graphics.c | 60 ++++++++++++++++++++++++-----------
1 file changed, 42 insertions(+), 18 deletions(-)
dlls/win32u/dibdrv/graphics.c | 63 ++++++++++++++++++++++++-----------
1 file changed, 44 insertions(+), 19 deletions(-)
diff --git a/dlls/win32u/dibdrv/graphics.c b/dlls/win32u/dibdrv/graphics.c
index 3a6f8184009..b5231636261 100644
index 21d2eabbc9e..1eeea1d68ea 100644
--- a/dlls/win32u/dibdrv/graphics.c
+++ b/dlls/win32u/dibdrv/graphics.c
@@ -1535,6 +1535,23 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
@@ -1531,10 +1531,28 @@ BOOL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
DC *dc = get_physdev_dc( dev );
RECT rect;
POINT pt[2], *points;
- int i, end, count;
+ int i, end;
+ ULONG count;
BOOL ret = TRUE;
HRGN outline = 0, interior = 0;
@ -36,7 +42,7 @@ index 3a6f8184009..b5231636261 100644
if (!get_pen_device_rect( dc, pdev, &rect, left, top, right, bottom )) return TRUE;
pt[0].x = pt[0].y = 0;
@@ -1555,23 +1572,6 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
@@ -1555,23 +1573,6 @@ BOOL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
return FALSE;
}
@ -60,7 +66,7 @@ index 3a6f8184009..b5231636261 100644
count = ellipse_first_quadrant( ellipse_width, ellipse_height, points );
if (dc->attr->arc_direction == AD_CLOCKWISE)
@@ -1615,13 +1615,37 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
@@ -1615,13 +1616,37 @@ BOOL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
}
count = end + 1;
@ -74,7 +80,7 @@ index 3a6f8184009..b5231636261 100644
+ }
+
+ if (pdev->brush.style != BS_NULL &&
+ !(interior = ULongToHandle(NtGdiPolyPolyDraw( ULongToHandle(ALTERNATE), points, (const UINT *)&count, 1, NtGdiPolyPolygonRgn ))))
+ !(interior = ULongToHandle(NtGdiPolyPolyDraw( ULongToHandle(ALTERNATE), points, &count, 1, NtGdiPolyPolygonRgn ))))
+ {
+ free( points );
+ if (outline) NtGdiDeleteObjectApp( outline );
@ -100,5 +106,5 @@ index 3a6f8184009..b5231636261 100644
NtGdiDeleteObjectApp( interior );
}
--
2.33.0
2.43.0