wineps.drv: Set the line join and cap styles based on the selected pen.
This commit is contained in:
parent
6e89fd1832
commit
36a41abb9f
@ -70,6 +70,22 @@ HPEN CDECL PSDRV_SelectPen( PSDRV_PDEVICE *physDev, HPEN hpen )
|
|||||||
if(physDev->pen.width < 0) physDev->pen.width = -physDev->pen.width;
|
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);
|
PSDRV_CreateColor(physDev, &physDev->pen.color, logpen.lopnColor);
|
||||||
physDev->pen.style = logpen.lopnStyle & PS_STYLE_MASK;
|
physDev->pen.style = logpen.lopnStyle & PS_STYLE_MASK;
|
||||||
|
|
||||||
|
@ -129,8 +129,8 @@ static const char pssetfont[] = /* fontname, xscale, yscale, ascent, escapement
|
|||||||
"matrix concatmatrix\n"
|
"matrix concatmatrix\n"
|
||||||
"makefont setfont\n";
|
"makefont setfont\n";
|
||||||
|
|
||||||
static const char pssetlinewidth[] = /* width */
|
static const char pssetline[] = /* width, join, endcap */
|
||||||
"%d setlinewidth\n";
|
"%d setlinewidth %u setlinejoin %u setlinecap\n";
|
||||||
|
|
||||||
static const char pssetdash[] = /* dash, offset */
|
static const char pssetdash[] = /* dash, offset */
|
||||||
"[%s] %d setdash\n";
|
"[%s] %d setdash\n";
|
||||||
@ -581,7 +581,7 @@ BOOL PSDRV_WriteSetPen(PSDRV_PDEVICE *physDev)
|
|||||||
{
|
{
|
||||||
char buf[256];
|
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));
|
PSDRV_WriteSpool(physDev, buf, strlen(buf));
|
||||||
|
|
||||||
if(physDev->pen.dash) {
|
if(physDev->pen.dash) {
|
||||||
|
@ -326,7 +326,9 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
INT style;
|
INT style;
|
||||||
INT width;
|
INT width;
|
||||||
|
BYTE join;
|
||||||
|
BYTE endcap;
|
||||||
const char* dash;
|
const char* dash;
|
||||||
PSCOLOR color;
|
PSCOLOR color;
|
||||||
BOOL set;
|
BOOL set;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user