Translate pen width from logical units only for geometric pens.
This commit is contained in:
parent
22204c2c80
commit
ef4fc8fd91
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue