From 74fed4e1f47a5c2893cca2ffa240bb5011e1fa45 Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Mon, 17 Apr 2023 17:16:00 +0200 Subject: [PATCH] external ofNode to transform text --- src/GPUFontAtlasLayerCombo.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/GPUFontAtlasLayerCombo.cpp b/src/GPUFontAtlasLayerCombo.cpp index d5a9058..6d17139 100644 --- a/src/GPUFontAtlasLayerCombo.cpp +++ b/src/GPUFontAtlasLayerCombo.cpp @@ -212,9 +212,12 @@ void GPUFontAtlasLayerCombo::draw(){ std::vector indices; for(const auto & layer : layers){ - font->collectVerticesAndIndices(glm::vec3(layer->getProps().x, - layer->getProps().y, - 0), + ofNode node; + node.rotateDeg(layer->getProps().rotation, glm::vec3(0, 0, 1)); + node.move(glm::vec3(layer->getProps().x, + layer->getProps().y, + 0)); + font->collectVerticesAndIndices(node, layer->getVariationText(), vertices, indices, true, layer->getProps().fontSize_px);