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
aed042d4
Commit
aed042d4
authored
Jul 10, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Implement d2d_d3d_render_target_DrawText().
parent
b108a2ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
Makefile.in
dlls/d2d1/Makefile.in
+1
-0
render_target.c
dlls/d2d1/render_target.c
+36
-2
No files found.
dlls/d2d1/Makefile.in
View file @
aed042d4
MODULE
=
d2d1.dll
IMPORTLIB
=
d2d1
IMPORTS
=
d3d10_1 dxguid uuid
DELAYIMPORTS
=
dwrite
C_SRCS
=
\
bitmap.c
\
...
...
dlls/d2d1/render_target.c
View file @
aed042d4
...
...
@@ -44,6 +44,12 @@ static void d2d_matrix_multiply(D2D_MATRIX_3X2_F *a, const D2D_MATRIX_3X2_F *b)
a
->
_32
=
tmp
.
_31
*
b
->
_12
+
tmp
.
_32
*
b
->
_22
+
b
->
_32
;
}
static
void
d2d_point_set
(
D2D1_POINT_2F
*
dst
,
float
x
,
float
y
)
{
dst
->
x
=
x
;
dst
->
y
=
y
;
}
static
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
;
...
...
@@ -798,10 +804,38 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_DrawText(ID2D1RenderTarget *
const
WCHAR
*
string
,
UINT32
string_len
,
IDWriteTextFormat
*
text_format
,
const
D2D1_RECT_F
*
layout_rect
,
ID2D1Brush
*
brush
,
D2D1_DRAW_TEXT_OPTIONS
options
,
DWRITE_MEASURING_MODE
measuring_mode
)
{
FIXME
(
"iface %p, string %s, string_len %u, text_format %p, layout_rect %p, "
"brush %p, options %#x, measuring_mode %#x stub!
\n
"
,
IDWriteTextLayout
*
text_layout
;
IDWriteFactory
*
dwrite_factory
;
D2D1_POINT_2F
origin
;
HRESULT
hr
;
TRACE
(
"iface %p, string %s, string_len %u, text_format %p, layout_rect %p, "
"brush %p, options %#x, measuring_mode %#x.
\n
"
,
iface
,
debugstr_wn
(
string
,
string_len
),
string_len
,
text_format
,
layout_rect
,
brush
,
options
,
measuring_mode
);
if
(
measuring_mode
!=
DWRITE_MEASURING_MODE_NATURAL
)
FIXME
(
"Ignoring measuring mode %#x.
\n
"
,
measuring_mode
);
if
(
FAILED
(
hr
=
DWriteCreateFactory
(
DWRITE_FACTORY_TYPE_SHARED
,
&
IID_IDWriteFactory
,
(
IUnknown
**
)
&
dwrite_factory
)))
{
ERR
(
"Failed to create dwrite factory, hr %#x.
\n
"
,
hr
);
return
;
}
hr
=
IDWriteFactory_CreateTextLayout
(
dwrite_factory
,
string
,
string_len
,
text_format
,
layout_rect
->
right
-
layout_rect
->
left
,
layout_rect
->
bottom
-
layout_rect
->
top
,
&
text_layout
);
IDWriteFactory_Release
(
dwrite_factory
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to create text layout, hr %#x.
\n
"
,
hr
);
return
;
}
d2d_point_set
(
&
origin
,
layout_rect
->
left
,
layout_rect
->
top
);
ID2D1RenderTarget_DrawTextLayout
(
iface
,
origin
,
text_layout
,
brush
,
options
);
IDWriteTextLayout_Release
(
text_layout
);
}
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_DrawTextLayout
(
ID2D1RenderTarget
*
iface
,
...
...
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