From 5f03c6c81b0783bfb2efadcd2121a0eb87c7a3ef Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 28 Dec 2011 13:52:11 +0100 Subject: [PATCH] gdi32: Wide cosmetic pens don't support dashes. --- dlls/gdi32/dibdrv/objects.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index c9b7814a5d1..b30c0621f00 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -1305,23 +1305,25 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen ) switch (pdev->pen_style) { - case PS_SOLID: - case PS_INSIDEFRAME: - if(pdev->pen_width <= 1) - pdev->pen_lines = solid_pen_lines; - else - pdev->pen_lines = wide_pen_lines; - pdev->defer &= ~DEFER_PEN; - break; - case PS_DASH: case PS_DOT: case PS_DASHDOT: case PS_DASHDOTDOT: if(logpen.lopnStyle & PS_GEOMETRIC) break; - if(logpen.lopnWidth.x > 1) break; - pdev->pen_lines = dashed_pen_lines; - pdev->pen_pattern = dash_patterns[pdev->pen_style]; + if (pdev->pen_width == 1) /* wide cosmetic pens are not dashed */ + { + pdev->pen_lines = dashed_pen_lines; + pdev->pen_pattern = dash_patterns[pdev->pen_style]; + pdev->defer &= ~DEFER_PEN; + break; + } + /* fall through */ + case PS_SOLID: + case PS_INSIDEFRAME: + if(pdev->pen_width == 1) + pdev->pen_lines = solid_pen_lines; + else + pdev->pen_lines = wide_pen_lines; pdev->defer &= ~DEFER_PEN; break;