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
93d24de3
Commit
93d24de3
authored
Aug 06, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Added IDWriteColorGlyphRunEnumerator stub.
parent
fd35a1af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
4 deletions
+95
-4
dwrite_private.h
dlls/dwrite/dwrite_private.h
+2
-0
font.c
dlls/dwrite/font.c
+89
-0
main.c
dlls/dwrite/main.c
+4
-4
No files found.
dlls/dwrite/dwrite_private.h
View file @
93d24de3
...
...
@@ -136,6 +136,8 @@ extern HRESULT get_local_refkey(const WCHAR*,const FILETIME*,void**,UINT32*) DEC
extern
HRESULT
get_filestream_from_file
(
IDWriteFontFile
*
,
IDWriteFontFileStream
**
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_face_type_supported
(
DWRITE_FONT_FACE_TYPE
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_family_names_from_stream
(
IDWriteFontFileStream
*
,
UINT32
,
DWRITE_FONT_FACE_TYPE
,
IDWriteLocalizedStrings
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_colorglyphenum
(
FLOAT
,
FLOAT
,
const
DWRITE_GLYPH_RUN
*
,
const
DWRITE_GLYPH_RUN_DESCRIPTION
*
,
DWRITE_MEASURING_MODE
,
const
DWRITE_MATRIX
*
,
UINT32
,
IDWriteColorGlyphRunEnumerator
**
)
DECLSPEC_HIDDEN
;
/* Opentype font table functions */
struct
dwrite_font_props
{
...
...
dlls/dwrite/font.c
View file @
93d24de3
...
...
@@ -131,6 +131,11 @@ struct dwrite_glyphrunanalysis {
BYTE
*
bitmap
;
};
struct
dwrite_colorglyphenum
{
IDWriteColorGlyphRunEnumerator
IDWriteColorGlyphRunEnumerator_iface
;
LONG
ref
;
};
#define GLYPH_BLOCK_SHIFT 8
#define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT)
#define GLYPH_BLOCK_MASK (GLYPH_BLOCK_SIZE - 1)
...
...
@@ -199,6 +204,11 @@ static inline struct dwrite_glyphrunanalysis *impl_from_IDWriteGlyphRunAnalysis(
return
CONTAINING_RECORD
(
iface
,
struct
dwrite_glyphrunanalysis
,
IDWriteGlyphRunAnalysis_iface
);
}
static
inline
struct
dwrite_colorglyphenum
*
impl_from_IDWriteColorGlyphRunEnumerator
(
IDWriteColorGlyphRunEnumerator
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dwrite_colorglyphenum
,
IDWriteColorGlyphRunEnumerator_iface
);
}
static
inline
const
char
*
debugstr_tag
(
UINT32
tag
)
{
return
wine_dbg_sprintf
(
"%c%c%c%c"
,
tag
>>
24
,
(
tag
>>
16
)
&
0xff
,
(
tag
>>
8
)
&
0xff
,
tag
&
0xff
);
...
...
@@ -3321,3 +3331,82 @@ HRESULT create_glyphrunanalysis(DWRITE_RENDERING_MODE rendering_mode, DWRITE_MEA
*
ret
=
&
analysis
->
IDWriteGlyphRunAnalysis_iface
;
return
S_OK
;
}
/* IDWriteColorGlyphRunEnumerator */
static
HRESULT
WINAPI
colorglyphenum_QueryInterface
(
IDWriteColorGlyphRunEnumerator
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
dwrite_colorglyphenum
*
This
=
impl_from_IDWriteColorGlyphRunEnumerator
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualIID
(
riid
,
&
IID_IDWriteColorGlyphRunEnumerator
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
ppv
=
iface
;
IDWriteColorGlyphRunEnumerator_AddRef
(
iface
);
return
S_OK
;
}
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
colorglyphenum_AddRef
(
IDWriteColorGlyphRunEnumerator
*
iface
)
{
struct
dwrite_colorglyphenum
*
This
=
impl_from_IDWriteColorGlyphRunEnumerator
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
colorglyphenum_Release
(
IDWriteColorGlyphRunEnumerator
*
iface
)
{
struct
dwrite_colorglyphenum
*
This
=
impl_from_IDWriteColorGlyphRunEnumerator
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
ref
);
if
(
!
ref
)
heap_free
(
This
);
return
ref
;
}
static
HRESULT
WINAPI
colorglyphenum_MoveNext
(
IDWriteColorGlyphRunEnumerator
*
iface
,
BOOL
*
has_run
)
{
struct
dwrite_colorglyphenum
*
This
=
impl_from_IDWriteColorGlyphRunEnumerator
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
has_run
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
colorglyphenum_GetCurrentRun
(
IDWriteColorGlyphRunEnumerator
*
iface
,
DWRITE_COLOR_GLYPH_RUN
const
**
run
)
{
struct
dwrite_colorglyphenum
*
This
=
impl_from_IDWriteColorGlyphRunEnumerator
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
run
);
return
E_NOTIMPL
;
}
static
const
IDWriteColorGlyphRunEnumeratorVtbl
colorglyphenumvtbl
=
{
colorglyphenum_QueryInterface
,
colorglyphenum_AddRef
,
colorglyphenum_Release
,
colorglyphenum_MoveNext
,
colorglyphenum_GetCurrentRun
};
HRESULT
create_colorglyphenum
(
FLOAT
originX
,
FLOAT
originY
,
const
DWRITE_GLYPH_RUN
*
run
,
const
DWRITE_GLYPH_RUN_DESCRIPTION
*
rundescr
,
DWRITE_MEASURING_MODE
mode
,
const
DWRITE_MATRIX
*
transform
,
UINT32
palette
,
IDWriteColorGlyphRunEnumerator
**
ret
)
{
struct
dwrite_colorglyphenum
*
colorglyphenum
;
*
ret
=
NULL
;
colorglyphenum
=
heap_alloc
(
sizeof
(
*
colorglyphenum
));
if
(
!
colorglyphenum
)
return
E_OUTOFMEMORY
;
colorglyphenum
->
IDWriteColorGlyphRunEnumerator_iface
.
lpVtbl
=
&
colorglyphenumvtbl
;
colorglyphenum
->
ref
=
1
;
*
ret
=
&
colorglyphenum
->
IDWriteColorGlyphRunEnumerator_iface
;
return
S_OK
;
}
dlls/dwrite/main.c
View file @
93d24de3
...
...
@@ -1137,12 +1137,12 @@ static HRESULT WINAPI dwritefactory2_CreateFontFallbackBuilder(IDWriteFactory2 *
static
HRESULT
WINAPI
dwritefactory2_TranslateColorGlyphRun
(
IDWriteFactory2
*
iface
,
FLOAT
originX
,
FLOAT
originY
,
const
DWRITE_GLYPH_RUN
*
run
,
const
DWRITE_GLYPH_RUN_DESCRIPTION
*
rundescr
,
DWRITE_MEASURING_MODE
mode
,
const
DWRITE_MATRIX
*
transform
,
UINT32
palette
_index
,
IDWriteColorGlyphRunEnumerator
**
colorlayers
)
const
DWRITE_MATRIX
*
transform
,
UINT32
palette
,
IDWriteColorGlyphRunEnumerator
**
colorlayers
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory2
(
iface
);
FIXME
(
"(%p)->(%.2f %.2f %p %p %d %p %u %p): stub
\n
"
,
This
,
originX
,
originY
,
run
,
rundescr
,
mode
,
transform
,
palette
_index
,
colorlayers
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%.2f %.2f %p %p %d %p %u %p)
\n
"
,
This
,
originX
,
originY
,
run
,
rundescr
,
mode
,
transform
,
palette
,
colorlayers
);
return
create_colorglyphenum
(
originX
,
originY
,
run
,
rundescr
,
mode
,
transform
,
palette
,
colorlayers
)
;
}
static
HRESULT
WINAPI
dwritefactory2_CreateCustomRenderingParams
(
IDWriteFactory2
*
iface
,
FLOAT
gamma
,
FLOAT
contrast
,
...
...
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