dwrite: Use SetRect() instead of open coding it.

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2016-05-03 11:32:33 +02:00 committed by Alexandre Julliard
parent a5e2bd5902
commit 41729840e4
2 changed files with 2 additions and 7 deletions

View File

@ -603,10 +603,7 @@ void freetype_get_glyph_bbox(struct dwrite_glyphbitmap *bitmap)
LeaveCriticalSection(&freetype_cs);
/* flip Y axis */
bitmap->bbox.left = bbox.xMin;
bitmap->bbox.right = bbox.xMax;
bitmap->bbox.top = -bbox.yMax;
bitmap->bbox.bottom = -bbox.yMin;
SetRect(&bitmap->bbox, bbox.xMin, -bbox.yMax, bbox.xMax, -bbox.yMin);
}
static BOOL freetype_get_aliased_glyph_bitmap(struct dwrite_glyphbitmap *bitmap, FT_Glyph glyph)

View File

@ -339,9 +339,7 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac
if (FAILED(hr))
return hr;
target.left = target.top = 0;
target.right = This->size.cx;
target.bottom = This->size.cy;
SetRect(&target, 0, 0, This->size.cx, This->size.cy);
if (rendermode == DWRITE_RENDERING_MODE_OUTLINE) {
static const XFORM identity = { 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f };