mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 18:05:46 +00:00
[WIN32K] Fix bounds calculation when drawing with a pen
This commit is contained in:
parent
38788a2b07
commit
2928084e2f
1 changed files with 3 additions and 3 deletions
|
@ -25,16 +25,16 @@ AddPenLinesBounds(PDC dc, int count, POINT *points)
|
||||||
pbrLine = dc->dclevel.pbrLine;
|
pbrLine = dc->dclevel.pbrLine;
|
||||||
ASSERT(pbrLine);
|
ASSERT(pbrLine);
|
||||||
|
|
||||||
lWidth = pbrLine->lWidth;
|
lWidth = 0;
|
||||||
|
|
||||||
// Setup bounds
|
// Setup bounds
|
||||||
bounds.left = bounds.top = INT_MAX;
|
bounds.left = bounds.top = INT_MAX;
|
||||||
bounds.right = bounds.bottom = INT_MIN;
|
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 */
|
/* 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);
|
endcap = (PS_ENDCAP_MASK & pbrLine->ulPenStyle);
|
||||||
join = (PS_JOIN_MASK & pbrLine->ulPenStyle);
|
join = (PS_JOIN_MASK & pbrLine->ulPenStyle);
|
||||||
if (join == PS_JOIN_MITER)
|
if (join == PS_JOIN_MITER)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue