d2d1: Take scaling into account for the source offset in d2d_d3d_render_target_DrawBitmap().

This commit is contained in:
Henri Verbeet 2015-04-23 20:23:25 +02:00 committed by Alexandre Julliard
parent 4b3ca58fe9
commit b313680ab4
1 changed files with 2 additions and 2 deletions

View File

@ -779,10 +779,10 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_DrawBitmap(ID2D1RenderTarget
brush_desc.opacity = opacity;
brush_desc.transform._11 = fabsf((d.right - d.left) / (s.right - s.left));
brush_desc.transform._21 = 0.0f;
brush_desc.transform._31 = min(d.left, d.right) - min(s.left, s.right);
brush_desc.transform._31 = min(d.left, d.right) - min(s.left, s.right) * brush_desc.transform._11;
brush_desc.transform._12 = 0.0f;
brush_desc.transform._22 = fabsf((d.bottom - d.top) / (s.bottom - s.top));
brush_desc.transform._32 = min(d.top, d.bottom) - min(s.top, s.bottom);
brush_desc.transform._32 = min(d.top, d.bottom) - min(s.top, s.bottom) * brush_desc.transform._22;
if (FAILED(hr = ID2D1RenderTarget_CreateBitmapBrush(iface, bitmap, &bitmap_brush_desc, &brush_desc, &brush)))
{