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
ea5898c0
Commit
ea5898c0
authored
Jul 19, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jul 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Use atan2 instead of atan.
parent
8f865f42
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
graphics.c
dlls/gdiplus/graphics.c
+10
-11
No files found.
dlls/gdiplus/graphics.c
View file @
ea5898c0
...
...
@@ -112,17 +112,16 @@ static void draw_cap(HDC hdc, COLORREF color, GpLineCap cap, REAL size,
HBRUSH
brush
;
HPEN
pen
;
POINT
pt
[
4
];
REAL
theta
,
dsmall
,
dbig
,
dx
,
dy
,
invert
;
REAL
theta
,
dsmall
,
dbig
,
dx
,
dy
;
if
(
x2
!=
x1
)
theta
=
atan
((
y2
-
y1
)
/
(
x2
-
x1
)
);
theta
=
atan
2
(
y2
-
y1
,
x2
-
x1
);
else
if
(
y2
!=
y1
){
theta
=
M_PI_2
*
(
y2
>
y1
?
1
.
0
:
-
1
.
0
);
}
else
return
;
invert
=
((
x2
-
x1
)
>=
0
.
0
?
1
.
0
:
-
1
.
0
);
brush
=
CreateSolidBrush
(
color
);
pen
=
CreatePen
(
PS_SOLID
,
1
,
color
);
oldbrush
=
SelectObject
(
hdc
,
brush
);
...
...
@@ -164,14 +163,14 @@ static void draw_cap(HDC hdc, COLORREF color, GpLineCap cap, REAL size,
case
LineCapArrowAnchor
:
size
=
size
*
4
.
0
/
sqrt
(
3
.
0
);
dx
=
cos
(
M_PI
/
6
.
0
+
theta
)
*
size
*
invert
;
dy
=
sin
(
M_PI
/
6
.
0
+
theta
)
*
size
*
invert
;
dx
=
cos
(
M_PI
/
6
.
0
+
theta
)
*
size
;
dy
=
sin
(
M_PI
/
6
.
0
+
theta
)
*
size
;
pt
[
0
].
x
=
roundr
(
x2
-
dx
);
pt
[
0
].
y
=
roundr
(
y2
-
dy
);
dx
=
cos
(
-
M_PI
/
6
.
0
+
theta
)
*
size
*
invert
;
dy
=
sin
(
-
M_PI
/
6
.
0
+
theta
)
*
size
*
invert
;
dx
=
cos
(
-
M_PI
/
6
.
0
+
theta
)
*
size
;
dy
=
sin
(
-
M_PI
/
6
.
0
+
theta
)
*
size
;
pt
[
1
].
x
=
roundr
(
x2
-
dx
);
pt
[
1
].
y
=
roundr
(
y2
-
dy
);
...
...
@@ -203,8 +202,8 @@ static void draw_cap(HDC hdc, COLORREF color, GpLineCap cap, REAL size,
pt
[
1
].
x
=
roundr
(
pt
[
0
].
x
+
2
.
0
*
dx
);
pt
[
1
].
y
=
roundr
(
pt
[
0
].
y
+
2
.
0
*
dy
);
dx
=
cos
(
theta
)
*
size
*
invert
;
dy
=
sin
(
theta
)
*
size
*
invert
;
dx
=
cos
(
theta
)
*
size
;
dy
=
sin
(
theta
)
*
size
;
pt
[
2
].
x
=
roundr
(
x2
+
dx
);
pt
[
2
].
y
=
roundr
(
y2
+
dy
);
...
...
@@ -213,8 +212,8 @@ static void draw_cap(HDC hdc, COLORREF color, GpLineCap cap, REAL size,
break
;
case
LineCapRound
:
dx
=
-
cos
(
M_PI_2
+
theta
)
*
size
*
invert
;
dy
=
-
sin
(
M_PI_2
+
theta
)
*
size
*
invert
;
dx
=
-
cos
(
M_PI_2
+
theta
)
*
size
;
dy
=
-
sin
(
M_PI_2
+
theta
)
*
size
;
pt
[
0
].
x
=
((
x2
-
x1
)
>=
0
?
floorf
(
x2
-
dx
)
:
ceilf
(
x2
-
dx
));
pt
[
0
].
y
=
((
y2
-
y1
)
>=
0
?
floorf
(
y2
-
dy
)
:
ceilf
(
y2
-
dy
));
...
...
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