gdiplus: Support GdipSetTextRenderingHint in metafiles.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
084fa63e60
commit
683315d111
|
@ -110,6 +110,7 @@ extern GpStatus METAFILE_DrawImagePointsRect(GpMetafile* metafile, GpImage *imag
|
||||||
GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth,
|
GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth,
|
||||||
REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes* imageAttributes,
|
REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes* imageAttributes,
|
||||||
DrawImageAbort callback, VOID *callbackData) DECLSPEC_HIDDEN;
|
DrawImageAbort callback, VOID *callbackData) DECLSPEC_HIDDEN;
|
||||||
|
extern GpStatus METAFILE_AddSimpleProperty(GpMetafile *metafile, SHORT prop, SHORT val) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
extern void calc_curve_bezier(const GpPointF *pts, REAL tension, REAL *x1,
|
extern void calc_curve_bezier(const GpPointF *pts, REAL tension, REAL *x1,
|
||||||
REAL *y1, REAL *x2, REAL *y2) DECLSPEC_HIDDEN;
|
REAL *y1, REAL *x2, REAL *y2) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -5987,6 +5987,18 @@ GpStatus WINGDIPAPI GdipSetTextRenderingHint(GpGraphics *graphics,
|
||||||
if(graphics->busy)
|
if(graphics->busy)
|
||||||
return ObjectBusy;
|
return ObjectBusy;
|
||||||
|
|
||||||
|
if(graphics->texthint == hint)
|
||||||
|
return Ok;
|
||||||
|
|
||||||
|
if(graphics->image && graphics->image->type == ImageTypeMetafile) {
|
||||||
|
GpStatus stat;
|
||||||
|
|
||||||
|
stat = METAFILE_AddSimpleProperty((GpMetafile*)graphics->image,
|
||||||
|
EmfPlusRecordTypeSetTextRenderingHint, hint);
|
||||||
|
if(stat != Ok)
|
||||||
|
return stat;
|
||||||
|
}
|
||||||
|
|
||||||
graphics->texthint = hint;
|
graphics->texthint = hint;
|
||||||
|
|
||||||
return Ok;
|
return Ok;
|
||||||
|
|
|
@ -2551,3 +2551,21 @@ GpStatus METAFILE_DrawImagePointsRect(GpMetafile *metafile, GpImage *image,
|
||||||
METAFILE_WriteRecords(metafile);
|
METAFILE_WriteRecords(metafile);
|
||||||
return Ok;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GpStatus METAFILE_AddSimpleProperty(GpMetafile *metafile, SHORT prop, SHORT val)
|
||||||
|
{
|
||||||
|
EmfPlusRecordHeader *record;
|
||||||
|
GpStatus stat;
|
||||||
|
|
||||||
|
if (metafile->metafile_type != MetafileTypeEmfPlusOnly && metafile->metafile_type != MetafileTypeEmfPlusDual)
|
||||||
|
return Ok;
|
||||||
|
|
||||||
|
stat = METAFILE_AllocateRecord(metafile, sizeof(*record), (void**)&record);
|
||||||
|
if (stat != Ok) return stat;
|
||||||
|
|
||||||
|
record->Type = prop;
|
||||||
|
record->Flags = val;
|
||||||
|
|
||||||
|
METAFILE_WriteRecords(metafile);
|
||||||
|
return Ok;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue