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
025c3201
Commit
025c3201
authored
Jul 20, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Implement d2d_geometry_sink_SetFillMode().
parent
f5b4da0d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
d2d1_private.h
dlls/d2d1/d2d1_private.h
+1
-0
geometry.c
dlls/d2d1/geometry.c
+14
-5
d2d1.c
dlls/d2d1/tests/d2d1.c
+0
-0
No files found.
dlls/d2d1/d2d1_private.h
View file @
025c3201
...
...
@@ -229,6 +229,7 @@ struct d2d_geometry
size_t
figure_count
;
enum
d2d_geometry_state
state
;
D2D1_FILL_MODE
fill_mode
;
UINT32
segment_count
;
}
path
;
struct
...
...
dlls/d2d1/geometry.c
View file @
025c3201
...
...
@@ -514,8 +514,8 @@ static int d2d_cdt_compare_vertices(const void *a, const void *b)
return
diff
==
0
.
0
f
?
0
:
(
diff
>
0
.
0
f
?
1
:
-
1
);
}
/* Determine whether a given point is inside the geometry, using the
even-odd
* rule. */
/* Determine whether a given point is inside the geometry, using the
current
*
fill mode
rule. */
static
BOOL
d2d_path_geometry_point_inside
(
const
struct
d2d_geometry
*
geometry
,
const
D2D1_POINT_2F
*
probe
)
{
const
D2D1_POINT_2F
*
p0
,
*
p1
;
...
...
@@ -535,11 +535,16 @@ static BOOL d2d_path_geometry_point_inside(const struct d2d_geometry *geometry,
d2d_point_subtract
(
&
v_probe
,
probe
,
p0
);
if
((
probe
->
y
<
p0
->
y
)
!=
(
probe
->
y
<
p1
->
y
)
&&
v_probe
.
x
<
v_p
.
x
*
(
v_probe
.
y
/
v_p
.
y
))
++
score
;
{
if
(
geometry
->
u
.
path
.
fill_mode
==
D2D1_FILL_MODE_ALTERNATE
||
(
probe
->
y
<
p0
->
y
))
++
score
;
else
--
score
;
}
}
}
return
score
&
1
;
return
geometry
->
u
.
path
.
fill_mode
==
D2D1_FILL_MODE_ALTERNATE
?
score
&
1
:
score
;
}
static
BOOL
d2d_path_geometry_add_face
(
struct
d2d_geometry
*
geometry
,
const
struct
d2d_cdt
*
cdt
,
...
...
@@ -970,7 +975,11 @@ static ULONG STDMETHODCALLTYPE d2d_geometry_sink_Release(ID2D1GeometrySink *ifac
static
void
STDMETHODCALLTYPE
d2d_geometry_sink_SetFillMode
(
ID2D1GeometrySink
*
iface
,
D2D1_FILL_MODE
mode
)
{
FIXME
(
"iface %p, mode %#x stub!
\n
"
,
iface
,
mode
);
struct
d2d_geometry
*
geometry
=
impl_from_ID2D1GeometrySink
(
iface
);
TRACE
(
"iface %p, mode %#x.
\n
"
,
iface
,
mode
);
geometry
->
u
.
path
.
fill_mode
=
mode
;
}
static
void
STDMETHODCALLTYPE
d2d_geometry_sink_SetSegmentFlags
(
ID2D1GeometrySink
*
iface
,
D2D1_PATH_SEGMENT
flags
)
...
...
dlls/d2d1/tests/d2d1.c
View file @
025c3201
This diff is collapsed.
Click to expand it.
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