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
0acfffc1
Commit
0acfffc1
authored
Sep 04, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Sep 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Don't calculate the number of points in the arc by dividing.
parent
99012b9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
gdiplus.c
dlls/gdiplus/gdiplus.c
+12
-13
No files found.
dlls/gdiplus/gdiplus.c
View file @
0acfffc1
...
@@ -211,38 +211,37 @@ static void unstretch_angle(REAL * angle, REAL rad_x, REAL rad_y)
...
@@ -211,38 +211,37 @@ static void unstretch_angle(REAL * angle, REAL rad_x, REAL rad_y)
INT
arc2polybezier
(
GpPointF
*
points
,
REAL
x1
,
REAL
y1
,
REAL
x2
,
REAL
y2
,
INT
arc2polybezier
(
GpPointF
*
points
,
REAL
x1
,
REAL
y1
,
REAL
x2
,
REAL
y2
,
REAL
startAngle
,
REAL
sweepAngle
)
REAL
startAngle
,
REAL
sweepAngle
)
{
{
INT
i
,
count
;
INT
i
;
REAL
end_angle
,
start_angle
,
endAngle
;
REAL
end_angle
,
start_angle
,
endAngle
;
endAngle
=
startAngle
+
sweepAngle
;
endAngle
=
startAngle
+
sweepAngle
;
unstretch_angle
(
&
startAngle
,
x2
/
2
.
0
,
y2
/
2
.
0
);
unstretch_angle
(
&
startAngle
,
x2
/
2
.
0
,
y2
/
2
.
0
);
unstretch_angle
(
&
endAngle
,
x2
/
2
.
0
,
y2
/
2
.
0
);
unstretch_angle
(
&
endAngle
,
x2
/
2
.
0
,
y2
/
2
.
0
);
count
=
ceilf
(
fabs
(
endAngle
-
startAngle
)
/
M_PI_2
)
*
3
+
1
;
/* don't make more than a full circle */
count
=
min
(
MAX_ARC_PTS
,
count
);
if
(
count
==
1
)
return
0
;
if
(
!
points
)
return
count
;
/* start_angle and end_angle are the iterative variables */
/* start_angle and end_angle are the iterative variables */
start_angle
=
startAngle
;
start_angle
=
startAngle
;
for
(
i
=
0
;
i
<
count
-
1
;
i
+=
3
){
for
(
i
=
0
;
i
<
MAX_ARC_PTS
-
1
;
i
+=
3
){
/* check if we've overshot the end angle */
/* check if we've overshot the end angle */
if
(
sweepAngle
>
0
.
0
)
if
(
sweepAngle
>
0
.
0
)
{
if
(
start_angle
>=
endAngle
)
break
;
end_angle
=
min
(
start_angle
+
M_PI_2
,
endAngle
);
end_angle
=
min
(
start_angle
+
M_PI_2
,
endAngle
);
}
else
else
{
if
(
start_angle
<=
endAngle
)
break
;
end_angle
=
max
(
start_angle
-
M_PI_2
,
endAngle
);
end_angle
=
max
(
start_angle
-
M_PI_2
,
endAngle
);
}
add_arc_part
(
&
points
[
i
],
x1
,
y1
,
x2
,
y2
,
start_angle
,
end_angle
,
i
==
0
);
if
(
points
)
add_arc_part
(
&
points
[
i
],
x1
,
y1
,
x2
,
y2
,
start_angle
,
end_angle
,
i
==
0
);
start_angle
+=
M_PI_2
*
(
sweepAngle
<
0
.
0
?
-
1
.
0
:
1
.
0
);
start_angle
+=
M_PI_2
*
(
sweepAngle
<
0
.
0
?
-
1
.
0
:
1
.
0
);
}
}
return
count
;
if
(
i
==
0
)
return
0
;
else
return
i
+
1
;
}
}
COLORREF
ARGB2COLORREF
(
ARGB
color
)
COLORREF
ARGB2COLORREF
(
ARGB
color
)
...
...
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