Kaydet (Commit) 57cc338d authored tarafından xukai's avatar xukai Kaydeden (comit) Kohei Yoshida

Using 3D fonts

Change-Id: If6cdece9f100f51b7a69ac4be4e316fb9c9928d5
Reviewed-on: https://gerrit.libreoffice.org/11535Reviewed-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
Tested-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
üst 98cb400d
...@@ -1164,9 +1164,9 @@ void GL3DBarChart::addMovementScreenText(sal_uInt32 nBarId) ...@@ -1164,9 +1164,9 @@ void GL3DBarChart::addMovementScreenText(sal_uInt32 nBarId)
rBarInfo.maPos.y + BAR_SIZE_Y / 2.0f, rBarInfo.maPos.y + BAR_SIZE_Y / 2.0f,
rBarInfo.maPos.z); rBarInfo.maPos.z);
OUString aBarValue = OUString("Value: ") + OUString::number(rBarInfo.mnVal); OUString aBarValue = OUString("Value: ") + OUString::number(rBarInfo.mnVal);
maScreenTextShapes.push_back(new opengl3D::ScreenText(mpRenderer.get(), *mpTextCache, aBarValue, glm::vec4(0.0f, 0.0f, 1.0f, 0.0f), CALC_POS_EVENT_ID)); maScreenTextShapes.push_back(new opengl3D::ScreenText(mpRenderer.get(), *mpTextCache, aBarValue, glm::vec4(0.0f, 0.0f, 1.0f, 0.0f), CALC_POS_EVENT_ID, true));
const opengl3D::TextCacheItem& rTextCache = mpTextCache->getText(aBarValue); const opengl3D::TextCacheItem& rTextCache = mpTextCache->getText(aBarValue);
float nRectWidth = (float)rTextCache.maSize.Width() / (float)rTextCache.maSize.Height() * 0.03; float nRectWidth = (float)rTextCache.maSize.Width() / (float)rTextCache.maSize.Height() * 0.015;
opengl3D::ScreenText* pScreenText = static_cast<opengl3D::ScreenText*>(&maScreenTextShapes.back()); opengl3D::ScreenText* pScreenText = static_cast<opengl3D::ScreenText*>(&maScreenTextShapes.back());
pScreenText->setPosition(glm::vec2(-nRectWidth / 2, 0.03f), glm::vec2(nRectWidth / 2, -0.03f), aTextPos); pScreenText->setPosition(glm::vec2(-nRectWidth / 2, 0.03f), glm::vec2(nRectWidth / 2, -0.03f), aTextPos);
} }
...@@ -1361,9 +1361,9 @@ void GL3DBarChart::updateScroll() ...@@ -1361,9 +1361,9 @@ void GL3DBarChart::updateScroll()
for(size_t i = 0; i < aBarInfoList.size(); i++) for(size_t i = 0; i < aBarInfoList.size(); i++)
{ {
OUString aBarValue = OUString("Value: ") + OUString::number(aBarInfoList[i].mnVal); OUString aBarValue = OUString("Value: ") + OUString::number(aBarInfoList[i].mnVal);
maScreenTextShapes.push_back(new opengl3D::ScreenText(mpRenderer.get(), *mpTextCache, aBarValue, glm::vec4(0.0f, 0.0f, 1.0f, 0.0f), CALC_POS_EVENT_ID)); maScreenTextShapes.push_back(new opengl3D::ScreenText(mpRenderer.get(), *mpTextCache, aBarValue, glm::vec4(0.0f, 0.0f, 1.0f, 0.0f), CALC_POS_EVENT_ID, true));
const opengl3D::TextCacheItem& rTextCache = mpTextCache->getText(aBarValue); const opengl3D::TextCacheItem& rTextCache = mpTextCache->getText(aBarValue);
float nRectWidth = (float)rTextCache.maSize.Width() / (float)rTextCache.maSize.Height() * 0.03; float nRectWidth = (float)rTextCache.maSize.Width() / (float)rTextCache.maSize.Height() * 0.015;
glm::vec3 aTextPos = glm::vec3(aBarInfoList[i].maPos.x + BAR_SIZE_X / 2.0f, glm::vec3 aTextPos = glm::vec3(aBarInfoList[i].maPos.x + BAR_SIZE_X / 2.0f,
aBarInfoList[i].maPos.y + BAR_SIZE_Y / 2.0f, aBarInfoList[i].maPos.y + BAR_SIZE_Y / 2.0f,
aBarInfoList[i].maPos.z); aBarInfoList[i].maPos.z);
......
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