Skip to content

Commit 17c56a3

Browse files
committed
Drawing2dText: Last tweaks
1 parent 5471edc commit 17c56a3

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

sketches/Drawing2dText/src/Sketch.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,17 @@ void Sketch::draw()
6969
font1->replaySequence(sequence1);
7070

7171
font2->beginSequence(sequence2);
72-
drawCircularText(*font2, TEXT, windowInfo.center(), RADIUS, clock()->getTime() * 100.0f, XFont::ALIGN_MIDDLE);
72+
drawCircularText(*font2, TEXT, windowInfo.center(), RADIUS, -clock()->getTime() * 100.0f, XFont::ALIGN_MIDDLE);
7373
font2->endSequence();
7474
font2->replaySequence(sequence2);
7575
}
7676

7777
void Sketch::drawGuides()
7878
{
79-
float width = windowInfo.width;
80-
float height = windowInfo.height;
81-
82-
strokeBatch.addVertices(glm::vec2(PADDING, 0), glm::vec2(PADDING, height));
83-
strokeBatch.addVertices(glm::vec2(width - PADDING, 0), glm::vec2(width - PADDING, height));
84-
strokeBatch.addVertices(glm::vec2(0, PADDING), glm::vec2(width, PADDING));
85-
strokeBatch.addVertices(glm::vec2(0, height - PADDING), glm::vec2(width, height - PADDING));
79+
strokeBatch.addVertices(glm::vec2(PADDING, 0), glm::vec2(PADDING, windowInfo.height));
80+
strokeBatch.addVertices(glm::vec2(windowInfo.width - PADDING, 0), glm::vec2(windowInfo.width - PADDING, windowInfo.height));
81+
strokeBatch.addVertices(glm::vec2(0, PADDING), glm::vec2(windowInfo.width, PADDING));
82+
strokeBatch.addVertices(glm::vec2(0, windowInfo.height - PADDING), glm::vec2(windowInfo.width, windowInfo.height - PADDING));
8683
}
8784

8885
void Sketch::drawCircle(const glm::vec2 &position, float radius)

0 commit comments

Comments
 (0)