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
74735f32
Commit
74735f32
authored
Dec 08, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Use d2d_point_set() in d2d_rectangle_geometry_init().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
91baf67e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
d2d1_private.h
dlls/d2d1/d2d1_private.h
+6
-0
geometry.c
dlls/d2d1/geometry.c
+13
-8
render_target.c
dlls/d2d1/render_target.c
+0
-6
No files found.
dlls/d2d1/d2d1_private.h
View file @
74735f32
...
...
@@ -382,6 +382,12 @@ static inline BOOL d2d_matrix_invert(D2D_MATRIX_3X2_F *dst, const D2D_MATRIX_3X2
return
TRUE
;
}
static
inline
void
d2d_point_set
(
D2D1_POINT_2F
*
dst
,
float
x
,
float
y
)
{
dst
->
x
=
x
;
dst
->
y
=
y
;
}
static
inline
void
d2d_point_transform
(
D2D1_POINT_2F
*
dst
,
const
D2D1_MATRIX_3X2_F
*
matrix
,
float
x
,
float
y
)
{
dst
->
x
=
x
*
matrix
->
_11
+
y
*
matrix
->
_21
+
matrix
->
_31
;
...
...
dlls/d2d1/geometry.c
View file @
74735f32
...
...
@@ -2600,6 +2600,9 @@ static const struct ID2D1RectangleGeometryVtbl d2d_rectangle_geometry_vtbl =
HRESULT
d2d_rectangle_geometry_init
(
struct
d2d_geometry
*
geometry
,
ID2D1Factory
*
factory
,
const
D2D1_RECT_F
*
rect
)
{
D2D1_POINT_2F
*
fv
;
float
l
,
r
,
t
,
b
;
d2d_geometry_init
(
geometry
,
factory
,
&
identity
,
(
ID2D1GeometryVtbl
*
)
&
d2d_rectangle_geometry_vtbl
);
geometry
->
u
.
rectangle
.
rect
=
*
rect
;
...
...
@@ -2617,14 +2620,16 @@ HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry, ID2D1Factory
}
geometry
->
fill
.
face_count
=
2
;
geometry
->
fill
.
vertices
[
0
].
x
=
min
(
rect
->
left
,
rect
->
right
);
geometry
->
fill
.
vertices
[
0
].
y
=
min
(
rect
->
top
,
rect
->
bottom
);
geometry
->
fill
.
vertices
[
1
].
x
=
min
(
rect
->
left
,
rect
->
right
);
geometry
->
fill
.
vertices
[
1
].
y
=
max
(
rect
->
top
,
rect
->
bottom
);
geometry
->
fill
.
vertices
[
2
].
x
=
max
(
rect
->
left
,
rect
->
right
);
geometry
->
fill
.
vertices
[
2
].
y
=
min
(
rect
->
top
,
rect
->
bottom
);
geometry
->
fill
.
vertices
[
3
].
x
=
max
(
rect
->
left
,
rect
->
right
);
geometry
->
fill
.
vertices
[
3
].
y
=
max
(
rect
->
top
,
rect
->
bottom
);
l
=
min
(
rect
->
left
,
rect
->
right
);
r
=
max
(
rect
->
left
,
rect
->
right
);
t
=
min
(
rect
->
top
,
rect
->
bottom
);
b
=
max
(
rect
->
top
,
rect
->
bottom
);
fv
=
geometry
->
fill
.
vertices
;
d2d_point_set
(
&
fv
[
0
],
l
,
t
);
d2d_point_set
(
&
fv
[
1
],
l
,
b
);
d2d_point_set
(
&
fv
[
2
],
r
,
t
);
d2d_point_set
(
&
fv
[
3
],
r
,
b
);
geometry
->
fill
.
faces
[
0
].
v
[
0
]
=
0
;
geometry
->
fill
.
faces
[
0
].
v
[
1
]
=
2
;
...
...
dlls/d2d1/render_target.c
View file @
74735f32
...
...
@@ -42,12 +42,6 @@ static ID2D1Brush *d2d_draw_get_text_brush(struct d2d_draw_text_layout_ctx *cont
return
context
->
brush
;
}
static
void
d2d_point_set
(
D2D1_POINT_2F
*
dst
,
float
x
,
float
y
)
{
dst
->
x
=
x
;
dst
->
y
=
y
;
}
static
void
d2d_rect_expand
(
D2D1_RECT_F
*
dst
,
const
D2D1_POINT_2F
*
point
)
{
if
(
point
->
x
<
dst
->
left
)
...
...
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