improve the text rendering a little bit more
Change-Id: I7662b77df94c439678d17fe31e611272d1802981
This commit is contained in:
committed by
Markus Mohrhard
parent
6e38357d5d
commit
6fd54c8e34
@@ -75,13 +75,17 @@ Text::Text(OpenGL3DRenderer* pRenderer, const OUString& rStr, sal_uInt32 nId):
|
|||||||
Font aFont = aDevice.GetFont();
|
Font aFont = aDevice.GetFont();
|
||||||
aFont.SetSize(Size(0, 96));
|
aFont.SetSize(Size(0, 96));
|
||||||
aFont.SetColor(COL_BLACK);
|
aFont.SetColor(COL_BLACK);
|
||||||
|
::Rectangle aRect;
|
||||||
aDevice.SetFont(aFont);
|
aDevice.SetFont(aFont);
|
||||||
aDevice.Erase();
|
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.SetBackground(Wallpaper(COL_TRANSPARENT));
|
||||||
aDevice.DrawText(Point(0,0), rStr);
|
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()
|
void Text::render()
|
||||||
|
Reference in New Issue
Block a user