Rename getRowHeight

This commit is contained in:
Atlante45 2015-06-12 19:50:32 +02:00
parent 26dd067982
commit 30ae78e3b6
3 changed files with 5 additions and 5 deletions

View file

@ -47,7 +47,7 @@ void RenderableTextEntityItem::render(RenderArgs* args) {
glm::vec3 maxCorner = glm::vec3(dimensions.x, 0.0f, SLIGHTLY_BEHIND);
DependencyManager::get<DeferredLightingEffect>()->renderQuad(batch, minCorner, maxCorner, backgroundColor);
float scale = _lineHeight / _textRenderer->getRowHeight();
float scale = _lineHeight / _textRenderer->getFontSize();
transformToTopLeft.setScale(scale); // Scale to have the correct line height
batch.setModelTransform(transformToTopLeft);

View file

@ -113,7 +113,7 @@ public:
void read(QIODevice& path);
glm::vec2 computeExtent(const QString& str) const;
float getRowHeight() const { return _fontSize; }
float getFontSize() const { return _fontSize; }
// Render string to batch
void drawString(gpu::Batch& batch, float x, float y, const QString& str,
@ -476,9 +476,9 @@ glm::vec2 TextRenderer3D::computeExtent(const QString& str) const {
return glm::vec2(0.0f, 0.0f);
}
float TextRenderer3D::getRowHeight() const {
float TextRenderer3D::getFontSize() const {
if (_font) {
return _font->getRowHeight();
return _font->getFontSize();
}
return 0.0f;
}

View file

@ -50,7 +50,7 @@ public:
~TextRenderer3D();
glm::vec2 computeExtent(const QString& str) const;
float getRowHeight() const;
float getFontSize() const;
void draw(gpu::Batch& batch, float x, float y, const QString& str, const glm::vec4& color = glm::vec4(-1.0f),
const glm::vec2& bounds = glm::vec2(-1.0f));