improve the text rendering a little bit more

Change-Id: I7662b77df94c439678d17fe31e611272d1802981
This commit is contained in:
Markus Mohrhard
2014-05-21 16:03:59 +02:00
committed by Markus Mohrhard
parent 6e38357d5d
commit 6fd54c8e34

View File

@@ -75,13 +75,17 @@ Text::Text(OpenGL3DRenderer* pRenderer, const OUString& rStr, sal_uInt32 nId):
Font aFont = aDevice.GetFont();
aFont.SetSize(Size(0, 96));
aFont.SetColor(COL_BLACK);
::Rectangle aRect;
aDevice.SetFont(aFont);
aDevice.Erase();
aDevice.SetOutputSizePixel(Size(160,96));
aDevice.GetTextBoundRect(aRect, rStr);
Size aSize = aRect.GetSize();
aSize.Height() *= 2;
aDevice.SetOutputSizePixel(aSize);
aDevice.SetBackground(Wallpaper(COL_TRANSPARENT));
aDevice.DrawText(Point(0,0), rStr);
maText = BitmapEx(aDevice.GetBitmapEx(Point(0,0), Size(160,96)));
maText = BitmapEx(aDevice.GetBitmapEx(Point(0,0), aSize));
}
void Text::render()