wineps.drv: Set the line join and cap styles based on the selected pen.

This commit is contained in:
Alexandre Julliard 2009-03-24 15:24:06 +01:00
parent 6e89fd1832
commit 36a41abb9f
3 changed files with 22 additions and 4 deletions

View File

@ -70,6 +70,22 @@ HPEN CDECL PSDRV_SelectPen( PSDRV_PDEVICE *physDev, HPEN hpen )
if(physDev->pen.width < 0) physDev->pen.width = -physDev->pen.width;
}
switch (logpen.lopnStyle & PS_JOIN_MASK)
{
default:
case PS_JOIN_ROUND: physDev->pen.join = 1; break;
case PS_JOIN_BEVEL: physDev->pen.join = 2; break;
case PS_JOIN_MITER: physDev->pen.join = 0; break;
}
switch (logpen.lopnStyle & PS_ENDCAP_MASK)
{
default:
case PS_ENDCAP_ROUND: physDev->pen.endcap = 1; break;
case PS_ENDCAP_SQUARE: physDev->pen.endcap = 2; break;
case PS_ENDCAP_FLAT: physDev->pen.endcap = 0; break;
}
PSDRV_CreateColor(physDev, &physDev->pen.color, logpen.lopnColor);
physDev->pen.style = logpen.lopnStyle & PS_STYLE_MASK;

View File

@ -129,8 +129,8 @@ static const char pssetfont[] = /* fontname, xscale, yscale, ascent, escapement
"matrix concatmatrix\n"
"makefont setfont\n";
static const char pssetlinewidth[] = /* width */
"%d setlinewidth\n";
static const char pssetline[] = /* width, join, endcap */
"%d setlinewidth %u setlinejoin %u setlinecap\n";
static const char pssetdash[] = /* dash, offset */
"[%s] %d setdash\n";
@ -581,7 +581,7 @@ BOOL PSDRV_WriteSetPen(PSDRV_PDEVICE *physDev)
{
char buf[256];
sprintf(buf, pssetlinewidth, physDev->pen.width);
sprintf(buf, pssetline, physDev->pen.width, physDev->pen.join, physDev->pen.endcap);
PSDRV_WriteSpool(physDev, buf, strlen(buf));
if(physDev->pen.dash) {

View File

@ -326,7 +326,9 @@ typedef struct {
typedef struct {
INT style;
INT width;
INT width;
BYTE join;
BYTE endcap;
const char* dash;
PSCOLOR color;
BOOL set;