Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ab63eb5c
Commit
ab63eb5c
authored
Dec 28, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix the scaling of the width of cosmetic pens.
parent
9b8d920c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
objects.c
dlls/gdi32/dibdrv/objects.c
+10
-12
No files found.
dlls/gdi32/dibdrv/objects.c
View file @
ab63eb5c
...
...
@@ -1245,18 +1245,15 @@ static const dash_pattern dash_patterns[5] =
{
6
,
{
9
,
3
,
3
,
3
,
3
,
3
},
24
}
/* PS_DASHDOTDOT */
};
static
inline
int
get_pen_device_width
(
dibdrv_physdev
*
pdev
,
LOGPEN
*
pen
)
static
inline
int
get_pen_device_width
(
dibdrv_physdev
*
pdev
,
int
width
)
{
int
width
=
pen
->
lopnWidth
.
x
;
POINT
pts
[
2
]
;
if
(
pen
->
lopnStyle
&
PS_GEOMETRIC
&&
width
>
1
)
{
POINT
pts
[
2
];
pts
[
0
].
x
=
pts
[
0
].
y
=
pts
[
1
].
y
=
0
;
pts
[
1
].
x
=
width
;
LPtoDP
(
pdev
->
dev
.
hdc
,
pts
,
2
);
width
=
abs
(
pts
[
1
].
x
-
pts
[
0
].
x
);
}
if
(
!
width
)
return
1
;
pts
[
0
].
x
=
pts
[
0
].
y
=
pts
[
1
].
y
=
0
;
pts
[
1
].
x
=
width
;
LPtoDP
(
pdev
->
dev
.
hdc
,
pts
,
2
);
width
=
abs
(
pts
[
1
].
x
-
pts
[
0
].
x
);
return
max
(
width
,
1
);
}
...
...
@@ -1285,15 +1282,16 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen )
/* FIXME: add support for user style pens */
logpen
.
lopnStyle
=
elp
->
elpPenStyle
;
logpen
.
lopnWidth
.
x
=
elp
->
elpWidth
;
logpen
.
lopnWidth
.
y
=
0
;
logpen
.
lopnColor
=
elp
->
elpColor
;
/* cosmetic ext pens are always 1-pixel wide */
if
(
!
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
))
logpen
.
lopnWidth
.
x
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
elp
);
}
pdev
->
pen_join
=
logpen
.
lopnStyle
&
PS_JOIN_MASK
;
pdev
->
pen_endcap
=
logpen
.
lopnStyle
&
PS_ENDCAP_MASK
;
pdev
->
pen_width
=
get_pen_device_width
(
pdev
,
&
logpen
);
pdev
->
pen_width
=
get_pen_device_width
(
pdev
,
logpen
.
lopnWidth
.
x
);
if
(
hpen
==
GetStockObject
(
DC_PEN
))
logpen
.
lopnColor
=
GetDCPenColor
(
dev
->
hdc
);
...
...
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