https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2928084e2f86f1b2b39214dfaf872e76c0561650
commit 2928084e2f86f1b2b39214dfaf872e76c0561650 Author: Jérôme Gardou <jerome.gar...@reactos.org> AuthorDate: Tue Mar 24 11:20:58 2020 +0000 Commit: Jérôme Gardou <zefk...@users.noreply.github.com> CommitDate: Tue Mar 24 14:39:27 2020 +0100 [WIN32K] Fix bounds calculation when drawing with a pen --- win32ss/gdi/ntgdi/line.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win32ss/gdi/ntgdi/line.c b/win32ss/gdi/ntgdi/line.c index 5274fa2c228..c922995925d 100644 --- a/win32ss/gdi/ntgdi/line.c +++ b/win32ss/gdi/ntgdi/line.c @@ -25,16 +25,16 @@ AddPenLinesBounds(PDC dc, int count, POINT *points) pbrLine = dc->dclevel.pbrLine; ASSERT(pbrLine); - lWidth = pbrLine->lWidth; + lWidth = 0; // Setup bounds bounds.left = bounds.top = INT_MAX; bounds.right = bounds.bottom = INT_MIN; - if (((pbrLine->ulPenStyle & PS_TYPE_MASK) & PS_GEOMETRIC) || lWidth > 1) + if (((pbrLine->ulPenStyle & PS_TYPE_MASK) & PS_GEOMETRIC) || (pbrLine->lWidth > 1)) { /* Windows uses some heuristics to estimate the distance from the point that will be painted */ - lWidth = lWidth + 2; + lWidth = pbrLine->lWidth + 2; endcap = (PS_ENDCAP_MASK & pbrLine->ulPenStyle); join = (PS_JOIN_MASK & pbrLine->ulPenStyle); if (join == PS_JOIN_MITER)