mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 14:47:19 +02:00
Rename getRowHeight
This commit is contained in:
parent
26dd067982
commit
30ae78e3b6
3 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue