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
2250f0e5
Commit
2250f0e5
authored
Oct 23, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Derive some format data for text layout from specified text format.
parent
8089f73e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
dwrite_private.h
dlls/dwrite/dwrite_private.h
+1
-1
layout.c
dlls/dwrite/layout.c
+11
-1
main.c
dlls/dwrite/main.c
+3
-3
No files found.
dlls/dwrite/dwrite_private.h
View file @
2250f0e5
...
@@ -70,7 +70,7 @@ static inline LPWSTR heap_strdupnW(const WCHAR *str, UINT32 len)
...
@@ -70,7 +70,7 @@ static inline LPWSTR heap_strdupnW(const WCHAR *str, UINT32 len)
extern
HRESULT
create_font_from_logfont
(
const
LOGFONTW
*
,
IDWriteFont
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_font_from_logfont
(
const
LOGFONTW
*
,
IDWriteFont
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_textformat
(
const
WCHAR
*
,
IDWriteFontCollection
*
,
DWRITE_FONT_WEIGHT
,
DWRITE_FONT_STYLE
,
DWRITE_FONT_STRETCH
,
extern
HRESULT
create_textformat
(
const
WCHAR
*
,
IDWriteFontCollection
*
,
DWRITE_FONT_WEIGHT
,
DWRITE_FONT_STYLE
,
DWRITE_FONT_STRETCH
,
FLOAT
,
const
WCHAR
*
,
IDWriteTextFormat
**
)
DECLSPEC_HIDDEN
;
FLOAT
,
const
WCHAR
*
,
IDWriteTextFormat
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_textlayout
(
const
WCHAR
*
,
UINT32
,
IDWriteTextLayout
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_textlayout
(
const
WCHAR
*
,
UINT32
,
IDWriteText
Format
*
,
IDWriteText
Layout
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_gdiinterop
(
IDWriteGdiInterop
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_gdiinterop
(
IDWriteGdiInterop
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_localizedstrings
(
IDWriteLocalizedStrings
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_localizedstrings
(
IDWriteLocalizedStrings
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
add_localizedstring
(
IDWriteLocalizedStrings
*
,
const
WCHAR
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
add_localizedstring
(
IDWriteLocalizedStrings
*
,
const
WCHAR
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/dwrite/layout.c
View file @
2250f0e5
...
@@ -664,7 +664,7 @@ static const IDWriteTextLayoutVtbl dwritetextlayoutvtbl = {
...
@@ -664,7 +664,7 @@ static const IDWriteTextLayoutVtbl dwritetextlayoutvtbl = {
dwritetextlayout_HitTestTextRange
dwritetextlayout_HitTestTextRange
};
};
HRESULT
create_textlayout
(
const
WCHAR
*
str
,
UINT32
len
,
IDWriteTextLayout
**
layout
)
HRESULT
create_textlayout
(
const
WCHAR
*
str
,
UINT32
len
,
IDWriteText
Format
*
format
,
IDWriteText
Layout
**
layout
)
{
{
struct
dwrite_textlayout
*
This
;
struct
dwrite_textlayout
*
This
;
...
@@ -678,6 +678,16 @@ HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextLayout **layo
...
@@ -678,6 +678,16 @@ HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextLayout **layo
This
->
str
=
heap_strdupnW
(
str
,
len
);
This
->
str
=
heap_strdupnW
(
str
,
len
);
memset
(
&
This
->
format
,
0
,
sizeof
(
This
->
format
));
memset
(
&
This
->
format
,
0
,
sizeof
(
This
->
format
));
/* reference is not kept here, instead copy all underlying data */
if
(
format
)
{
IDWriteTextFormat_GetFontCollection
(
format
,
&
This
->
format
.
collection
);
This
->
format
.
weight
=
IDWriteTextFormat_GetFontWeight
(
format
);
This
->
format
.
style
=
IDWriteTextFormat_GetFontStyle
(
format
);
This
->
format
.
stretch
=
IDWriteTextFormat_GetFontStretch
(
format
);
This
->
format
.
size
=
IDWriteTextFormat_GetFontSize
(
format
);
}
*
layout
=
&
This
->
IDWriteTextLayout_iface
;
*
layout
=
&
This
->
IDWriteTextLayout_iface
;
return
S_OK
;
return
S_OK
;
...
...
dlls/dwrite/main.c
View file @
2250f0e5
...
@@ -506,10 +506,10 @@ static HRESULT WINAPI dwritefactory_GetGdiInterop(IDWriteFactory *iface, IDWrite
...
@@ -506,10 +506,10 @@ static HRESULT WINAPI dwritefactory_GetGdiInterop(IDWriteFactory *iface, IDWrite
static
HRESULT
WINAPI
dwritefactory_CreateTextLayout
(
IDWriteFactory
*
iface
,
WCHAR
const
*
string
,
static
HRESULT
WINAPI
dwritefactory_CreateTextLayout
(
IDWriteFactory
*
iface
,
WCHAR
const
*
string
,
UINT32
len
,
IDWriteTextFormat
*
format
,
FLOAT
max_width
,
FLOAT
max_height
,
IDWriteTextLayout
**
layout
)
UINT32
len
,
IDWriteTextFormat
*
format
,
FLOAT
max_width
,
FLOAT
max_height
,
IDWriteTextLayout
**
layout
)
{
{
FIXME
(
"(%s %u %p %f %f %p): stub
\n
"
,
debugstr_w
(
string
),
len
,
format
,
max_width
,
max_height
,
layout
);
TRACE
(
"(%s %u %p %f %f %p)
\n
"
,
debugstr_w
(
string
),
len
,
format
,
max_width
,
max_height
,
layout
);
if
(
!
format
)
return
E_INVALIDARG
;
if
(
!
format
)
return
E_INVALIDARG
;
return
create_textlayout
(
string
,
len
,
layout
);
return
create_textlayout
(
string
,
len
,
format
,
layout
);
}
}
static
HRESULT
WINAPI
dwritefactory_CreateGdiCompatibleTextLayout
(
IDWriteFactory
*
iface
,
WCHAR
const
*
string
,
static
HRESULT
WINAPI
dwritefactory_CreateGdiCompatibleTextLayout
(
IDWriteFactory
*
iface
,
WCHAR
const
*
string
,
...
@@ -520,7 +520,7 @@ static HRESULT WINAPI dwritefactory_CreateGdiCompatibleTextLayout(IDWriteFactory
...
@@ -520,7 +520,7 @@ static HRESULT WINAPI dwritefactory_CreateGdiCompatibleTextLayout(IDWriteFactory
pixels_per_dip
,
transform
,
use_gdi_natural
,
layout
);
pixels_per_dip
,
transform
,
use_gdi_natural
,
layout
);
if
(
!
format
)
return
E_INVALIDARG
;
if
(
!
format
)
return
E_INVALIDARG
;
return
create_textlayout
(
string
,
len
,
layout
);
return
create_textlayout
(
string
,
len
,
format
,
layout
);
}
}
static
HRESULT
WINAPI
dwritefactory_CreateEllipsisTrimmingSign
(
IDWriteFactory
*
iface
,
IDWriteTextFormat
*
format
,
static
HRESULT
WINAPI
dwritefactory_CreateEllipsisTrimmingSign
(
IDWriteFactory
*
iface
,
IDWriteTextFormat
*
format
,
...
...
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