Kaydet (Commit) 88562ee6 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Get texts to scale correctly with zoom.

We need to set scaling factors to device's map mode *only* for the texts.
Calc handles scaling for all the rest.  Interesting how it works.

Change-Id: Ia6aa122961ea5ddc2e31eacb28392f3e355a5ebf
üst 7fb400c8
......@@ -935,10 +935,20 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
aOutData.DrawShadow();
aOutData.DrawFrame();
// TODO : Scaling of strings is incorrect. Find out why.
// Set scaling to map mode only for text rendering, to get texts to scale
// correctly.
MapMode aOldMapMode = rDevice.GetMapMode();
MapMode aNewMapMode = aOldMapMode;
aNewMapMode.SetScaleX(aFracX);
aNewMapMode.SetScaleY(aFracY);
rDevice.SetMapMode(aNewMapMode);
aOutData.DrawStrings(true);
// TODO : Edit texts don't get rendered at all. Fix this.
aOutData.DrawEdit(true);
rDevice.SetMapMode(aOldMapMode);
}
void ScGridWindow::CheckNeedsRepaint()
......
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