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
f155db57
Commit
f155db57
authored
Dec 28, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add support for 1-pixel wide PS_USERSTYLE pens.
parent
305be80e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
objects.c
dlls/gdi32/dibdrv/objects.c
+27
-1
No files found.
dlls/gdi32/dibdrv/objects.c
View file @
f155db57
...
...
@@ -1253,6 +1253,24 @@ static const dash_pattern dash_patterns_geometric[4] =
{
6
,
{
3
,
1
,
1
,
1
,
1
,
1
},
8
}
/* PS_DASHDOTDOT */
};
static
inline
void
set_dash_pattern
(
dash_pattern
*
pattern
,
DWORD
count
,
DWORD
*
dashes
)
{
DWORD
i
;
pattern
->
count
=
count
;
pattern
->
total_len
=
0
;
memcpy
(
pattern
->
dashes
,
dashes
,
count
*
sizeof
(
DWORD
)
);
for
(
i
=
0
;
i
<
count
;
i
++
)
pattern
->
total_len
+=
dashes
[
i
];
if
(
pattern
->
count
%
2
)
pattern
->
total_len
*=
2
;
}
static
inline
void
scale_dash_pattern
(
dash_pattern
*
pattern
,
DWORD
scale
)
{
DWORD
i
;
for
(
i
=
0
;
i
<
pattern
->
count
;
i
++
)
pattern
->
dashes
[
i
]
*=
scale
;
pattern
->
total_len
*=
scale
;
}
static
inline
int
get_pen_device_width
(
dibdrv_physdev
*
pdev
,
int
width
)
{
POINT
pts
[
2
];
...
...
@@ -1303,7 +1321,7 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
logpen
.
lopnColor
=
GetDCPenColor
(
dev
->
hdc
);
pdev
->
pen_colorref
=
logpen
.
lopnColor
;
memset
(
&
pdev
->
pen_pattern
,
0
,
sizeof
(
pdev
->
pen_pattern
)
);
set_dash_pattern
(
&
pdev
->
pen_pattern
,
0
,
NULL
);
pdev
->
defer
|=
DEFER_PEN
;
...
...
@@ -1351,6 +1369,14 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
case
PS_USERSTYLE
:
if
(
pdev
->
pen_width
>
1
)
break
;
/* not supported yet */
pdev
->
pen_lines
=
dashed_pen_lines
;
set_dash_pattern
(
&
pdev
->
pen_pattern
,
elp
->
elpNumEntries
,
elp
->
elpStyleEntry
);
if
(
!
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
))
scale_dash_pattern
(
&
pdev
->
pen_pattern
,
3
);
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
default:
break
;
}
...
...
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