mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 10:43:38 +00:00
d2d1/commandlist: Implement SetTextRenderingParams() command.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
0e9f8babaf
commit
3aeff98f60
|
@ -25,6 +25,7 @@ enum d2d_command_type
|
|||
D2D_COMMAND_SET_ANTIALIAS_MODE,
|
||||
D2D_COMMAND_SET_TAGS,
|
||||
D2D_COMMAND_SET_TEXT_ANTIALIAS_MODE,
|
||||
D2D_COMMAND_SET_TEXT_RENDERING_PARAMS,
|
||||
D2D_COMMAND_SET_TRANSFORM,
|
||||
D2D_COMMAND_SET_PRIMITIVE_BLEND,
|
||||
D2D_COMMAND_SET_UNIT_MODE,
|
||||
|
@ -62,6 +63,12 @@ struct d2d_command_set_text_antialias_mode
|
|||
D2D1_TEXT_ANTIALIAS_MODE mode;
|
||||
};
|
||||
|
||||
struct d2d_command_set_text_rendering_params
|
||||
{
|
||||
struct d2d_command c;
|
||||
IDWriteRenderingParams *params;
|
||||
};
|
||||
|
||||
struct d2d_command_set_transform
|
||||
{
|
||||
struct d2d_command c;
|
||||
|
@ -239,6 +246,12 @@ static HRESULT STDMETHODCALLTYPE d2d_command_list_Stream(ID2D1CommandList *iface
|
|||
hr = ID2D1CommandSink_SetTextAntialiasMode(sink, c->mode);
|
||||
break;
|
||||
}
|
||||
case D2D_COMMAND_SET_TEXT_RENDERING_PARAMS:
|
||||
{
|
||||
const struct d2d_command_set_text_rendering_params *c = data;
|
||||
hr = ID2D1CommandSink_SetTextRenderingParams(sink, c->params);
|
||||
break;
|
||||
}
|
||||
case D2D_COMMAND_SET_TRANSFORM:
|
||||
{
|
||||
const struct d2d_command_set_transform *c = data;
|
||||
|
@ -537,6 +550,7 @@ void d2d_command_list_begin_draw(struct d2d_command_list *command_list,
|
|||
d2d_command_list_set_text_antialias_mode(command_list, context->drawing_state.textAntialiasMode);
|
||||
d2d_command_list_set_tags(command_list, context->drawing_state.tag1, context->drawing_state.tag2);
|
||||
d2d_command_list_set_transform(command_list, &context->drawing_state.transform);
|
||||
d2d_command_list_set_text_rendering_params(command_list, context->text_rendering_params);
|
||||
|
||||
command_list->state = D2D_COMMAND_LIST_STATE_OPEN;
|
||||
}
|
||||
|
@ -686,3 +700,17 @@ void d2d_command_list_fill_rectangle(struct d2d_command_list *command_list,
|
|||
command->rect = *rect;
|
||||
command->brush = brush;
|
||||
}
|
||||
|
||||
void d2d_command_list_set_text_rendering_params(struct d2d_command_list *command_list,
|
||||
IDWriteRenderingParams *params)
|
||||
{
|
||||
struct d2d_command_set_text_rendering_params *command;
|
||||
|
||||
if (!params) return;
|
||||
|
||||
d2d_command_list_reference_object(command_list, params);
|
||||
|
||||
command = d2d_command_list_require_space(command_list, sizeof(*command));
|
||||
command->c.op = D2D_COMMAND_SET_TEXT_RENDERING_PARAMS;
|
||||
command->params = params;
|
||||
}
|
||||
|
|
|
@ -759,6 +759,8 @@ void d2d_command_list_fill_geometry(struct d2d_command_list *command_list,
|
|||
ID2D1Brush *orig_opacity_brush) DECLSPEC_HIDDEN;
|
||||
void d2d_command_list_fill_rectangle(struct d2d_command_list *command_list,
|
||||
const struct d2d_device_context *context, const D2D1_RECT_F *rect, ID2D1Brush *orig_brush) DECLSPEC_HIDDEN;
|
||||
void d2d_command_list_set_text_rendering_params(struct d2d_command_list *command_list,
|
||||
IDWriteRenderingParams *params) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline BOOL d2d_array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
|
||||
{
|
||||
|
|
|
@ -1539,10 +1539,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTextRenderingParams(ID2D1Dev
|
|||
TRACE("iface %p, text_rendering_params %p.\n", iface, text_rendering_params);
|
||||
|
||||
if (context->target.type == D2D_TARGET_COMMAND_LIST)
|
||||
{
|
||||
FIXME("Unimplemented for command list target.\n");
|
||||
return;
|
||||
}
|
||||
d2d_command_list_set_text_rendering_params(context->target.command_list, text_rendering_params);
|
||||
|
||||
if (text_rendering_params)
|
||||
IDWriteRenderingParams_AddRef(text_rendering_params);
|
||||
|
|
Loading…
Reference in a new issue