Commit 5b471a29 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdi32/emf: Fix miter limit serialization.

parent 627181d9
......@@ -1371,7 +1371,7 @@ BOOL WINAPI SetMiterLimit( HDC hdc, FLOAT limit, FLOAT *old_limit )
{
DC_ATTR *dc_attr;
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
/* FIXME: record EMFs */
if (dc_attr->emf && !EMFDC_SetMiterLimit( dc_attr, limit )) return 0;
if (old_limit) *old_limit = dc_attr->miter_limit;
dc_attr->miter_limit = limit;
return TRUE;
......
......@@ -2254,6 +2254,16 @@ BOOL EMFDC_SetMapMode( DC_ATTR *dc_attr, INT mode )
return emfdc_record( get_dc_emf( dc_attr ), &emr.emr );
}
BOOL EMFDC_SetMiterLimit( DC_ATTR *dc_attr, FLOAT limit )
{
struct emr_set_miter_limit emr;
emr.emr.iType = EMR_SETMITERLIMIT;
emr.emr.nSize = sizeof(emr);
emr.eMiterLimit = limit;
return emfdc_record( get_dc_emf( dc_attr ), &emr.emr );
}
BOOL EMFDC_SetViewportExtEx( DC_ATTR *dc_attr, INT cx, INT cy )
{
EMRSETVIEWPORTEXTEX emr;
......
......@@ -1680,7 +1680,7 @@ BOOL WINAPI PlayEnhMetaFileRecord(
case EMR_SETMITERLIMIT:
{
const EMRSETMITERLIMIT *lpSetMiterLimit = (const EMRSETMITERLIMIT *)mr;
const struct emr_set_miter_limit *lpSetMiterLimit = (const struct emr_set_miter_limit *)mr;
SetMiterLimit( hdc, lpSetMiterLimit->eMiterLimit, NULL );
break;
}
......
......@@ -160,6 +160,15 @@ typedef struct
INT nBreakCount;
} EMRSETTEXTJUSTIFICATION, *PEMRSETTEXTJUSTIFICATION;
/* Public structure EMRSETMITERLIMIT is using a float field,
that does not match serialized output or documentation,
which are both using unsigned integer. */
struct emr_set_miter_limit
{
EMR emr;
DWORD eMiterLimit;
};
BOOL EMFDC_AbortPath( DC_ATTR *dc_attr );
BOOL EMFDC_AlphaBlend( DC_ATTR *dc_attr, INT x_dst, INT y_dst, INT width_dst, INT height_dst,
HDC hdc_src, INT x_src, INT y_src, INT width_src, INT height_src,
......@@ -232,6 +241,7 @@ INT EMFDC_SetDIBitsToDevice( DC_ATTR *dc_attr, INT x_dest, INT y_dest, DWORD wi
BOOL EMFDC_SetLayout( DC_ATTR *dc_attr, DWORD layout );
BOOL EMFDC_SetMapMode( DC_ATTR *dc_attr, INT mode );
BOOL EMFDC_SetMapperFlags( DC_ATTR *dc_attr, DWORD flags );
BOOL EMFDC_SetMiterLimit( DC_ATTR *dc_attr, FLOAT limit );
BOOL EMFDC_SetPixel( DC_ATTR *dc_attr, INT x, INT y, COLORREF color );
BOOL EMFDC_SetPolyFillMode( DC_ATTR *dc_attr, INT mode );
BOOL EMFDC_SetROP2( DC_ATTR *dc_attr, INT rop );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment