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
afa4d323
Commit
afa4d323
authored
Aug 13, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Aug 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Better handle UnitPixel pen width.
parent
e807eb9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
graphics.c
dlls/gdiplus/graphics.c
+17
-12
No files found.
dlls/gdiplus/graphics.c
View file @
afa4d323
...
...
@@ -92,18 +92,23 @@ static INT prepare_dc(GpGraphics *graphics, GpPen *pen)
EndPath
(
graphics
->
hdc
);
/* Get an estimate for the amount the pen width is affected by the world
* transform. (This is similar to what some of the wine drivers do.) */
pt
[
0
].
X
=
0
.
0
;
pt
[
0
].
Y
=
0
.
0
;
pt
[
1
].
X
=
1
.
0
;
pt
[
1
].
Y
=
1
.
0
;
GdipTransformMatrixPoints
(
graphics
->
worldtrans
,
pt
,
2
);
width
=
sqrt
((
pt
[
1
].
X
-
pt
[
0
].
X
)
*
(
pt
[
1
].
X
-
pt
[
0
].
X
)
+
(
pt
[
1
].
Y
-
pt
[
0
].
Y
)
*
(
pt
[
1
].
Y
-
pt
[
0
].
Y
))
/
sqrt
(
2
.
0
);
width
*=
pen
->
width
*
convert_unit
(
graphics
->
hdc
,
pen
->
unit
==
UnitWorld
?
graphics
->
unit
:
pen
->
unit
);
if
(
pen
->
unit
==
UnitPixel
){
width
=
pen
->
width
;
}
else
{
/* Get an estimate for the amount the pen width is affected by the world
* transform. (This is similar to what some of the wine drivers do.) */
pt
[
0
].
X
=
0
.
0
;
pt
[
0
].
Y
=
0
.
0
;
pt
[
1
].
X
=
1
.
0
;
pt
[
1
].
Y
=
1
.
0
;
GdipTransformMatrixPoints
(
graphics
->
worldtrans
,
pt
,
2
);
width
=
sqrt
((
pt
[
1
].
X
-
pt
[
0
].
X
)
*
(
pt
[
1
].
X
-
pt
[
0
].
X
)
+
(
pt
[
1
].
Y
-
pt
[
0
].
Y
)
*
(
pt
[
1
].
Y
-
pt
[
0
].
Y
))
/
sqrt
(
2
.
0
);
width
*=
pen
->
width
*
convert_unit
(
graphics
->
hdc
,
pen
->
unit
==
UnitWorld
?
graphics
->
unit
:
pen
->
unit
);
}
if
(
pen
->
dash
==
DashStyleCustom
){
numdashes
=
min
(
pen
->
numdashes
,
MAX_DASHLEN
);
...
...
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