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
0b40c9cb
Commit
0b40c9cb
authored
Sep 20, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Sep 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement LineCapRound in GdipWidenPath.
parent
8871af7e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
2 deletions
+45
-2
graphicspath.c
dlls/gdiplus/graphicspath.c
+45
-2
No files found.
dlls/gdiplus/graphicspath.c
View file @
0b40c9cb
...
...
@@ -1799,6 +1799,49 @@ static void widen_cap(const GpPointF *endpoint, const GpPointF *nextpoint,
break
;
}
case
LineCapRound
:
{
REAL
segment_dy
=
nextpoint
->
Y
-
endpoint
->
Y
;
REAL
segment_dx
=
nextpoint
->
X
-
endpoint
->
X
;
REAL
segment_length
=
sqrtf
(
segment_dy
*
segment_dy
+
segment_dx
*
segment_dx
);
REAL
distance
=
pen
->
width
/
2
.
0
;
REAL
dx
,
dy
,
dx2
,
dy2
;
const
REAL
control_point_distance
=
0
.
5522847498307935
;
/* 4/3 * (sqrt(2) - 1) */
if
(
add_first_points
)
{
dx
=
-
distance
*
segment_dx
/
segment_length
;
dy
=
-
distance
*
segment_dy
/
segment_length
;
dx2
=
dx
*
control_point_distance
;
dy2
=
dy
*
control_point_distance
;
/* first 90-degree arc */
*
last_point
=
add_path_list_node
(
*
last_point
,
endpoint
->
X
+
dy
,
endpoint
->
Y
-
dx
,
PathPointTypeLine
);
*
last_point
=
add_path_list_node
(
*
last_point
,
endpoint
->
X
+
dy
+
dx2
,
endpoint
->
Y
-
dx
+
dy2
,
PathPointTypeBezier
);
*
last_point
=
add_path_list_node
(
*
last_point
,
endpoint
->
X
+
dx
+
dy2
,
endpoint
->
Y
+
dy
-
dx2
,
PathPointTypeBezier
);
/* midpoint */
*
last_point
=
add_path_list_node
(
*
last_point
,
endpoint
->
X
+
dx
,
endpoint
->
Y
+
dy
,
PathPointTypeBezier
);
/* second 90-degree arc */
*
last_point
=
add_path_list_node
(
*
last_point
,
endpoint
->
X
+
dx
-
dy2
,
endpoint
->
Y
+
dy
+
dx2
,
PathPointTypeBezier
);
*
last_point
=
add_path_list_node
(
*
last_point
,
endpoint
->
X
-
dy
+
dx2
,
endpoint
->
Y
+
dx
+
dy2
,
PathPointTypeBezier
);
*
last_point
=
add_path_list_node
(
*
last_point
,
endpoint
->
X
-
dy
,
endpoint
->
Y
+
dx
,
PathPointTypeBezier
);
}
break
;
}
}
}
...
...
@@ -1905,10 +1948,10 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix,
{
last_point
=
points
;
if
(
pen
->
endcap
>
LineCap
Square
)
if
(
pen
->
endcap
>
LineCap
Round
)
FIXME
(
"unimplemented end cap %x
\n
"
,
pen
->
endcap
);
if
(
pen
->
startcap
>
LineCap
Square
)
if
(
pen
->
startcap
>
LineCap
Round
)
FIXME
(
"unimplemented start cap %x
\n
"
,
pen
->
startcap
);
if
(
pen
->
dashcap
!=
DashCapFlat
)
...
...
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