Bug 548942: Draw in device pixels and not in DIPs. 1 device pixel per DIP always. r=jrmuizel
authorBas Schouten <bschouten@mozilla.com>
Sat, 20 Mar 2010 18:25:40 +0100
changeset 39664 0154b0cea0f2e8f3cede2dd740b94248497b9fb2
parent 39663 a41fd278d491d87e8c389a44ca0e1d8f81406536
child 39665 4b4a1b1cb99aa2dd5ff742e067927cf9e5ea0c60
push idunknown
push userunknown
push dateunknown
reviewersjrmuizel
bugs548942
milestone1.9.3a4pre
Bug 548942: Draw in device pixels and not in DIPs. 1 device pixel per DIP always. r=jrmuizel
gfx/cairo/cairo/src/cairo-dwrite-font.cpp
--- a/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
+++ b/gfx/cairo/cairo/src/cairo-dwrite-font.cpp
@@ -932,16 +932,18 @@ cairo_int_status_t
     IDWriteRenderingParams *params;
     DWriteFactory::Instance()->CreateRenderingParams(&params);
 
     gdiInterop->CreateBitmapRenderTarget(surface->dc, 
 					 area.right - area.left, 
 					 area.bottom - area.top, 
 					 &rt);
 
+    rt->SetPixelsPerDip(1.0);
+
     if (transform) {
 	rt->SetCurrentTransform(transform);
     }
     BitBlt(rt->GetMemoryDC(),
 	   0, 0,
 	   area.right - area.left, area.bottom - area.top,
 	   surface->dc,
 	   area.left, area.top,