[Libreoffice-commits] core.git: chart2/source
xukai
xukai at multicorewareinc.com
Tue Sep 23 07:59:06 PDT 2014
chart2/source/view/inc/3DChartObjects.hxx | 6 +++---
chart2/source/view/main/3DChartObjects.cxx | 12 ++++++++----
2 files changed, 11 insertions(+), 7 deletions(-)
New commits:
commit 98cb400d08a35d26e211fffda24e5b7c6e6672bf
Author: xukai <xukai at multicorewareinc.com>
Date: Mon Sep 22 19:01:31 2014 +0800
3D fonts suport
Change-Id: Id8142586e8ace4ba91a30b2f78d1216f89f22148
Reviewed-on: https://gerrit.libreoffice.org/11585
Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
Tested-by: Kohei Yoshida <libreoffice at kohei.us>
diff --git a/chart2/source/view/inc/3DChartObjects.hxx b/chart2/source/view/inc/3DChartObjects.hxx
old mode 100644
new mode 100755
index 49b21a3..39d09b4
--- a/chart2/source/view/inc/3DChartObjects.hxx
+++ b/chart2/source/view/inc/3DChartObjects.hxx
@@ -37,7 +37,7 @@ struct TextCacheItem
class TextCache
{
public:
- const TextCacheItem &getText(OUString const & rText);
+ const TextCacheItem &getText(OUString const & rText, bool bIs3dText = false);
private:
typedef boost::ptr_map<OUString const, TextCacheItem> TextCacheType;
@@ -108,8 +108,8 @@ private:
class ScreenText : public Renderable3DObject
{
public:
- ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache, const OUString& rStr,
- const glm::vec4& rColor, sal_uInt32 nId);
+ ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache,
+ const OUString& rStr, glm::vec4 rColor, sal_uInt32 nId, bool bIs3dText = false);
virtual void render() SAL_OVERRIDE;
void setPosition(const glm::vec2& rTopLeft, const glm::vec2& rBottomRight,
diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
old mode 100644
new mode 100755
index c0992e4..13d1fb3
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -70,14 +70,18 @@ void Line::setLineColor(const Color& rColor)
maLineColor = rColor;
}
-const TextCacheItem& TextCache::getText(OUString const & rText)
+const TextCacheItem& TextCache::getText(OUString const & rText, bool bIs3dText)
{
TextCacheType::const_iterator itr = maTextCache.find(rText);
if(itr != maTextCache.end())
return *itr->second;
VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0);
- vcl::Font aFont = aDevice.GetFont();
+ vcl::Font aFont;
+ if(bIs3dText)
+ aFont = vcl::Font("postoffice Bold",Size(0,0));
+ else
+ aFont = aDevice.GetFont();
aFont.SetSize(Size(0, 96));
static bool bOldRender = getenv("OLDRENDER");
if (bOldRender)
@@ -129,9 +133,9 @@ void Text::setPosition(const glm::vec3& rTopLeft, const glm::vec3& rTopRight, co
}
ScreenText::ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache,
- const OUString& rStr, const glm::vec4& rColor, sal_uInt32 nId):
+ const OUString& rStr, glm::vec4 rColor, sal_uInt32 nId, bool bIs3dText):
Renderable3DObject(pRenderer, nId),
- maText(rTextCache.getText(rStr)),
+ maText(rTextCache.getText(rStr,bIs3dText)),
maColor(rColor)
{
}
More information about the Libreoffice-commits
mailing list