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
c98d34d7
Commit
c98d34d7
authored
Oct 07, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Only test overlapping figures in d2d_geometry_intersect_self().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
20ff3352
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
geometry.c
dlls/d2d1/geometry.c
+27
-0
No files found.
dlls/d2d1/geometry.c
View file @
c98d34d7
...
...
@@ -55,6 +55,8 @@ struct d2d_figure
struct
d2d_bezier
*
beziers
;
size_t
beziers_size
;
size_t
bezier_count
;
D2D1_RECT_F
bounds
;
};
struct
d2d_cdt_edge_ref
...
...
@@ -422,6 +424,18 @@ static BOOL d2d_array_reserve(void **elements, size_t *capacity, size_t element_
return
TRUE
;
}
static
void
d2d_figure_update_bounds
(
struct
d2d_figure
*
figure
,
D2D1_POINT_2F
vertex
)
{
if
(
vertex
.
x
<
figure
->
bounds
.
left
)
figure
->
bounds
.
left
=
vertex
.
x
;
if
(
vertex
.
x
>
figure
->
bounds
.
right
)
figure
->
bounds
.
right
=
vertex
.
x
;
if
(
vertex
.
y
<
figure
->
bounds
.
top
)
figure
->
bounds
.
top
=
vertex
.
y
;
if
(
vertex
.
y
>
figure
->
bounds
.
bottom
)
figure
->
bounds
.
bottom
=
vertex
.
y
;
}
static
BOOL
d2d_figure_insert_vertex
(
struct
d2d_figure
*
figure
,
size_t
idx
,
D2D1_POINT_2F
vertex
)
{
if
(
!
d2d_array_reserve
((
void
**
)
&
figure
->
vertices
,
&
figure
->
vertices_size
,
...
...
@@ -434,6 +448,7 @@ static BOOL d2d_figure_insert_vertex(struct d2d_figure *figure, size_t idx, D2D1
memmove
(
&
figure
->
vertices
[
idx
+
1
],
&
figure
->
vertices
[
idx
],
(
figure
->
vertex_count
-
idx
)
*
sizeof
(
*
figure
->
vertices
));
figure
->
vertices
[
idx
]
=
vertex
;
d2d_figure_update_bounds
(
figure
,
vertex
);
++
figure
->
vertex_count
;
return
TRUE
;
}
...
...
@@ -448,6 +463,7 @@ static BOOL d2d_figure_add_vertex(struct d2d_figure *figure, D2D1_POINT_2F verte
}
figure
->
vertices
[
figure
->
vertex_count
]
=
vertex
;
d2d_figure_update_bounds
(
figure
,
vertex
);
++
figure
->
vertex_count
;
return
TRUE
;
}
...
...
@@ -1426,6 +1442,13 @@ static BOOL d2d_geometry_intersect_self(struct d2d_geometry *geometry)
for
(
j
=
min_j
,
min_j
=
0
,
l
=
min_l
,
min_l
=
0
;
j
<
i
||
(
j
==
i
&&
k
);
++
j
,
l
=
0
)
{
figure_q
=
&
geometry
->
u
.
path
.
figures
[
j
];
if
(
figure_p
->
bounds
.
left
>
figure_q
->
bounds
.
right
||
figure_q
->
bounds
.
left
>
figure_p
->
bounds
.
right
||
figure_p
->
bounds
.
top
>
figure_q
->
bounds
.
bottom
||
figure_q
->
bounds
.
top
>
figure_p
->
bounds
.
bottom
)
continue
;
max_l
=
j
==
i
?
k
-
1
:
figure_q
->
vertex_count
;
q0
=
figure_q
->
vertices
[
l
==
0
?
figure_q
->
vertex_count
-
1
:
l
-
1
];
for
(;
l
<
max_l
;
q0
=
q1
,
++
l
)
...
...
@@ -1550,6 +1573,10 @@ static BOOL d2d_path_geometry_add_figure(struct d2d_geometry *geometry)
figure
=
&
geometry
->
u
.
path
.
figures
[
geometry
->
u
.
path
.
figure_count
];
memset
(
figure
,
0
,
sizeof
(
*
figure
));
figure
->
bounds
.
left
=
FLT_MAX
;
figure
->
bounds
.
top
=
FLT_MAX
;
figure
->
bounds
.
right
=
-
FLT_MAX
;
figure
->
bounds
.
bottom
=
-
FLT_MAX
;
++
geometry
->
u
.
path
.
figure_count
;
return
TRUE
;
...
...
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