Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
d17e2073
Commit
d17e2073
authored
19 years ago
by
Felix Nawothnig
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Keep width for cosmetic pens, don't use LPtoDP() for widths and
convert the dashes for PS_USERSTYLE pens into device units.
parent
4440a727
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/gdi/path.c
+23
-9
23 additions, 9 deletions
dlls/gdi/path.c
with
23 additions
and
9 deletions
dlls/gdi/path.c
+
23
−
9
View file @
d17e2073
...
...
@@ -121,7 +121,18 @@ static inline void INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point)
dc
->
xformWorld2Vport
.
eDy
;
}
/* Performs a world-to-viewport transformation on the specified width.
*/
static
inline
void
INTERNAL_WSTODS
(
DC
*
dc
,
LONG
*
width
)
{
POINT
pt
[
2
];
pt
[
0
].
x
=
pt
[
0
].
y
=
0
;
pt
[
1
].
x
=
*
width
;
pt
[
1
].
y
=
0
;
LPtoDP
(
dc
->
hSelf
,
pt
,
2
);
*
width
=
pt
[
1
].
x
-
pt
[
0
].
x
;
}
/***********************************************************************
* BeginPath (GDI32.@)
*/
...
...
@@ -1446,24 +1457,28 @@ static BOOL PATH_StrokePath(DC *dc, GdiPath *pPath)
if
(
pPath
->
state
!=
PATH_Closed
)
return
FALSE
;
/* Convert pen
width to DP
for MWT_IDENTITY */
/* Convert pen
properties from logical to device units
for MWT_IDENTITY */
hOldPen
=
GetCurrentObject
(
dc
->
hSelf
,
OBJ_PEN
);
if
(
GetObjectType
(
hOldPen
)
==
OBJ_EXTPEN
)
{
POINT
ptPenWidth
;
EXTLOGPEN
elp
;
LOGBRUSH
lb
;
GetObjectW
(
hOldPen
,
sizeof
(
EXTLOGPEN
),
&
elp
);
ptPenWidth
.
x
=
elp
.
elpWidth
;
LPtoDP
(
dc
->
hSelf
,
&
ptPenWidth
,
1
);
if
(
elp
.
elpPenStyle
&
PS_GEOMETRIC
)
{
INTERNAL_WSTODS
(
dc
,
&
elp
.
elpWidth
);
if
(
elp
.
elpPenStyle
&
PS_USERSTYLE
)
for
(
i
=
0
;
i
<
elp
.
elpNumEntries
;
i
++
)
INTERNAL_WSTODS
(
dc
,
&
elp
.
elpStyleEntry
[
i
]);
}
lb
.
lbStyle
=
elp
.
elpBrushStyle
;
lb
.
lbColor
=
elp
.
elpColor
;
lb
.
lbHatch
=
elp
.
elpHatch
;
hNewPen
=
ExtCreatePen
(
elp
.
elpPenStyle
,
ptPen
Width
.
x
,
&
lb
,
hNewPen
=
ExtCreatePen
(
elp
.
elpPenStyle
,
elp
.
elp
Width
,
&
lb
,
elp
.
elpNumEntries
,
elp
.
elpStyleEntry
);
}
else
/* OBJ_PEN */
{
LOGPEN
lp
;
GetObjectW
(
hOldPen
,
sizeof
(
LOGPEN
),
&
lp
);
LPtoDP
(
dc
->
hSelf
,
&
lp
.
lopnWidth
,
1
);
if
(
lp
.
lopnWidth
.
x
>
0
)
INTERNAL_WSTODS
(
dc
,
&
lp
.
lopnWidth
.
x
);
hNewPen
=
CreatePenIndirect
(
&
lp
);
}
SelectObject
(
dc
->
hSelf
,
hNewPen
);
...
...
@@ -1494,8 +1509,7 @@ static BOOL PATH_StrokePath(DC *dc, GdiPath *pPath)
for
(
i
=
0
;
i
<
pPath
->
numEntriesUsed
;
i
++
)
{
if
((
i
==
0
||
(
pPath
->
pFlags
[
i
-
1
]
&
PT_CLOSEFIGURE
))
&&
(
pPath
->
pFlags
[
i
]
!=
PT_MOVETO
))
{
(
pPath
->
pFlags
[
i
]
!=
PT_MOVETO
))
{
ERR
(
"Expected PT_MOVETO %s, got path flag %d
\n
"
,
i
==
0
?
"as first point"
:
"after PT_CLOSEFIGURE"
,
(
INT
)
pPath
->
pFlags
[
i
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment