diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-21 14:48:44 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-05-21 14:50:53 +0200 |
commit | 1225fc104708d0d3b10233e19008f9a923ff5f90 (patch) | |
tree | 7ca9b9c59bc4d84f11d2c014d19041c99d6c5b5a /chart2 | |
parent | addc7e821fae471f2228af668791a19ee386fe30 (diff) |
improve the text rendering a bit
Less scaling means more beautiful text
Change-Id: I787244a5f7a472a14f463729f8f434a4969a6285
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/charttypes/GL3DBarChart.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/main/3DChartObjects.cxx | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index c2ec3713a899..542711a5d4fb 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -44,11 +44,11 @@ GL3DBarChart::~GL3DBarChart() namespace { -const float TEXT_HEIGHT = 10.0f; +const float TEXT_HEIGHT = 15.0f; float calculateTextWidth(const OUString& rText) { - return rText.getLength() * 5.0; + return rText.getLength() * 7.5; } } diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx index e67c25d96ec5..6edb68f3fc13 100644 --- a/chart2/source/view/main/3DChartObjects.cxx +++ b/chart2/source/view/main/3DChartObjects.cxx @@ -73,14 +73,15 @@ Text::Text(OpenGL3DRenderer* pRenderer, const OUString& rStr, sal_uInt32 nId): // Convert OUString to BitmapEx. VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0); Font aFont = aDevice.GetFont(); + aFont.SetSize(Size(0, 96)); aFont.SetColor(COL_BLACK); aDevice.SetFont(aFont); aDevice.Erase(); - aDevice.SetOutputSizePixel(Size(20,12)); + aDevice.SetOutputSizePixel(Size(160,96)); aDevice.SetBackground(Wallpaper(COL_TRANSPARENT)); aDevice.DrawText(Point(0,0), rStr); - maText = BitmapEx(aDevice.GetBitmapEx(Point(0,0), Size(20,12))); + maText = BitmapEx(aDevice.GetBitmapEx(Point(0,0), Size(160,96))); } void Text::render() |