Daniel Lehman : gdi32/tests: Add test for clipped polygon.
Module: wine Branch: master Commit: 418514820f03243c192ca5e6dfd0ab00ec740fd7 URL: https://source.winehq.org/git/wine.git/?a=commit;h=418514820f03243c192ca5e6d... Author: Daniel Lehman <dlehman(a)esri.com> Date: Fri Jul 13 14:41:55 2018 -0700 gdi32/tests: Add test for clipped polygon. Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/tests/path.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/dlls/gdi32/tests/path.c b/dlls/gdi32/tests/path.c index 80145fc..2356b96 100644 --- a/dlls/gdi32/tests/path.c +++ b/dlls/gdi32/tests/path.c @@ -1894,6 +1894,31 @@ static void test_all_functions(void) ReleaseDC( 0, hdc ); } +static void test_clipped_polygon_fill(void) +{ + const POINT pts[3] = {{-10, -10}, {10, -5}, {0, 10}}; + HBRUSH brush, oldbrush; + HBITMAP bmp, oldbmp; + HDC hdc, memdc; + COLORREF col; + + hdc = GetDC( 0 ); + memdc = CreateCompatibleDC( hdc ); + bmp = CreateCompatibleBitmap( hdc, 20, 20 ); + brush = CreateSolidBrush( RGB( 0x11, 0x22, 0x33 ) ); + oldbrush = SelectObject( memdc, brush ); + oldbmp = SelectObject( memdc, bmp ); + Polygon( memdc, pts, ARRAY_SIZE(pts) ); + col = GetPixel( memdc, 1, 1 ); + todo_wine ok( col == RGB( 0x11, 0x22, 0x33 ), "got %06x\n", col ); + SelectObject( memdc, oldbrush ); + SelectObject( memdc, oldbmp ); + DeleteObject( brush ); + DeleteObject( bmp ); + DeleteDC( memdc ); + ReleaseDC( 0, hdc ); +} + START_TEST(path) { test_path_state(); @@ -1906,5 +1931,6 @@ START_TEST(path) test_rectangle(); test_roundrect(); test_ellipse(); + test_clipped_polygon_fill(); test_all_functions(); }
participants (1)
-
Alexandre Julliard