Commit ef4fc8fd authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Translate pen width from logical units only for geometric pens.

parent 22204c2c
......@@ -58,9 +58,12 @@ HPEN PSDRV_SelectPen( PSDRV_PDEVICE *physDev, HPEN hpen )
TRACE("hpen = %p colour = %08lx\n", hpen, logpen.lopnColor);
physDev->pen.width = PSDRV_XWStoDS(physDev, logpen.lopnWidth.x);
if(physDev->pen.width < 0)
physDev->pen.width = -physDev->pen.width;
physDev->pen.width = logpen.lopnWidth.x;
if (logpen.lopnStyle & PS_GEOMETRIC)
{
physDev->pen.width = PSDRV_XWStoDS( physDev, physDev->pen.width );
if(physDev->pen.width < 0) physDev->pen.width = -physDev->pen.width;
}
PSDRV_CreateColor(physDev, &physDev->pen.color, logpen.lopnColor);
physDev->pen.style = logpen.lopnStyle & PS_STYLE_MASK;
......
......@@ -58,8 +58,13 @@ HPEN X11DRV_SelectPen( X11DRV_PDEVICE *physDev, HPEN hpen )
physDev->pen.endcap = logpen.lopnStyle & PS_ENDCAP_MASK;
physDev->pen.linejoin = logpen.lopnStyle & PS_JOIN_MASK;
physDev->pen.width = X11DRV_XWStoDS( physDev, logpen.lopnWidth.x );
if (physDev->pen.width < 0) physDev->pen.width = -physDev->pen.width;
physDev->pen.width = logpen.lopnWidth.x;
if (logpen.lopnStyle & PS_GEOMETRIC)
{
physDev->pen.width = X11DRV_XWStoDS( physDev, physDev->pen.width );
if (physDev->pen.width < 0) physDev->pen.width = -physDev->pen.width;
}
if (physDev->pen.width == 1) physDev->pen.width = 0; /* Faster */
if (hpen == GetStockObject( DC_PEN ))
logpen.lopnColor = GetDCPenColor( physDev->hdc );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment