Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
36a41abb
Commit
36a41abb
authored
Mar 24, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps.drv: Set the line join and cap styles based on the selected pen.
parent
6e89fd18
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
pen.c
dlls/wineps.drv/pen.c
+16
-0
ps.c
dlls/wineps.drv/ps.c
+3
-3
psdrv.h
dlls/wineps.drv/psdrv.h
+3
-1
No files found.
dlls/wineps.drv/pen.c
View file @
36a41abb
...
...
@@ -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
;
...
...
dlls/wineps.drv/ps.c
View file @
36a41abb
...
...
@@ -129,8 +129,8 @@ static const char pssetfont[] = /* fontname, xscale, yscale, ascent, escapement
"matrix concatmatrix
\n
"
"makefont setfont
\n
"
;
static
const
char
pssetline
width
[]
=
/* 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
,
pssetline
width
,
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
)
{
...
...
dlls/wineps.drv/psdrv.h
View file @
36a41abb
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment