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
f4f54e1f
Commit
f4f54e1f
authored
Oct 01, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Store render params properties and implement accessing methods.
parent
7a1746b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
13 deletions
+26
-13
main.c
dlls/dwrite/main.c
+26
-13
No files found.
dlls/dwrite/main.c
View file @
f4f54e1f
...
...
@@ -49,6 +49,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved)
struct
renderingparams
{
IDWriteRenderingParams
IDWriteRenderingParams_iface
;
LONG
ref
;
FLOAT
gamma
;
FLOAT
enh_contrast
;
FLOAT
cleartype_level
;
DWRITE_PIXEL_GEOMETRY
geometry
;
DWRITE_RENDERING_MODE
mode
;
};
static
inline
struct
renderingparams
*
impl_from_IDWriteRenderingParams
(
IDWriteRenderingParams
*
iface
)
...
...
@@ -98,36 +104,36 @@ static ULONG WINAPI renderingparams_Release(IDWriteRenderingParams *iface)
static
FLOAT
WINAPI
renderingparams_GetGamma
(
IDWriteRenderingParams
*
iface
)
{
struct
renderingparams
*
This
=
impl_from_IDWriteRenderingParams
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
128
.
0
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
gamma
;
}
static
FLOAT
WINAPI
renderingparams_GetEnhancedContrast
(
IDWriteRenderingParams
*
iface
)
{
struct
renderingparams
*
This
=
impl_from_IDWriteRenderingParams
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
0
.
0
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
enh_contrast
;
}
static
FLOAT
WINAPI
renderingparams_GetClearTypeLevel
(
IDWriteRenderingParams
*
iface
)
{
struct
renderingparams
*
This
=
impl_from_IDWriteRenderingParams
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
0
.
0
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
cleartype_level
;
}
static
DWRITE_PIXEL_GEOMETRY
WINAPI
renderingparams_GetPixelGeometry
(
IDWriteRenderingParams
*
iface
)
{
struct
renderingparams
*
This
=
impl_from_IDWriteRenderingParams
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
DWRITE_PIXEL_GEOMETRY_FLAT
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
geometry
;
}
static
DWRITE_RENDERING_MODE
WINAPI
renderingparams_GetRenderingMode
(
IDWriteRenderingParams
*
iface
)
{
struct
renderingparams
*
This
=
impl_from_IDWriteRenderingParams
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
DWRITE_RENDERING_MODE_DEFAULT
;
TRACE
(
"(%p)
\n
"
,
This
);
return
This
->
mode
;
}
static
const
struct
IDWriteRenderingParamsVtbl
renderingparamsvtbl
=
{
...
...
@@ -141,7 +147,8 @@ static const struct IDWriteRenderingParamsVtbl renderingparamsvtbl = {
renderingparams_GetRenderingMode
};
static
HRESULT
create_renderingparams
(
IDWriteRenderingParams
**
params
)
static
HRESULT
create_renderingparams
(
FLOAT
gamma
,
FLOAT
enhancedContrast
,
FLOAT
cleartype_level
,
DWRITE_PIXEL_GEOMETRY
geometry
,
DWRITE_RENDERING_MODE
mode
,
IDWriteRenderingParams
**
params
)
{
struct
renderingparams
*
This
;
...
...
@@ -153,6 +160,12 @@ static HRESULT create_renderingparams(IDWriteRenderingParams **params)
This
->
IDWriteRenderingParams_iface
.
lpVtbl
=
&
renderingparamsvtbl
;
This
->
ref
=
1
;
This
->
gamma
=
gamma
;
This
->
enh_contrast
=
enhancedContrast
;
This
->
cleartype_level
=
cleartype_level
;
This
->
geometry
=
geometry
;
This
->
mode
=
mode
;
*
params
=
&
This
->
IDWriteRenderingParams_iface
;
return
S_OK
;
...
...
@@ -250,8 +263,8 @@ static HRESULT WINAPI dwritefactory_CreateMonitorRenderingParams(IDWriteFactory
static
HRESULT
WINAPI
dwritefactory_CreateCustomRenderingParams
(
IDWriteFactory
*
iface
,
FLOAT
gamma
,
FLOAT
enhancedContrast
,
FLOAT
cleartype_level
,
DWRITE_PIXEL_GEOMETRY
geometry
,
DWRITE_RENDERING_MODE
mode
,
IDWriteRenderingParams
**
params
)
{
FIXME
(
"(%f %f %f %d %d %p): stub
\n
"
,
gamma
,
enhancedContrast
,
cleartype_level
,
geometry
,
mode
,
params
);
return
create_renderingparams
(
params
);
TRACE
(
"(%f %f %f %d %d %p)
\n
"
,
gamma
,
enhancedContrast
,
cleartype_level
,
geometry
,
mode
,
params
);
return
create_renderingparams
(
gamma
,
enhancedContrast
,
cleartype_level
,
geometry
,
mode
,
params
);
}
static
HRESULT
WINAPI
dwritefactory_RegisterFontFileLoader
(
IDWriteFactory
*
iface
,
IDWriteFontFileLoader
*
loader
)
...
...
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