Implement Font::MeasureString (TODO: double check!!)
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m53s
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m53s
This commit is contained in:
4
main.cpp
4
main.cpp
@@ -4,6 +4,7 @@
|
||||
#include <JGL/Colors.h>
|
||||
#include <J3ML/LinearAlgebra/Vector2.h>
|
||||
#include <JGL/Font.h>
|
||||
#include "jlog/jlog.hpp"
|
||||
|
||||
using J3ML::LinearAlgebra::Vector2;
|
||||
using namespace JGL;
|
||||
@@ -119,6 +120,9 @@ public:
|
||||
J2D::OutlineTriangle(Colors::Blue, {{100, 275}, {0, 275}, {100, 375}});
|
||||
J2D::DrawGradientLine(JGL::Colors::Red, JGL::Colors::Blue, {105, 375}, {200, 275}, 2);
|
||||
|
||||
auto result = Jupiteroid->MeasureString("Jupiteroid Font", 16);
|
||||
DEBUG(std::format("Result: {},{}", result.x, result.y ));
|
||||
|
||||
J2D::DrawString(JGL::Colors::Green, "Jupteroid Font", 0.f, 16, 1.f, 16, *Jupiteroid);
|
||||
J2D::DrawString(JGL::Colors::White, "Position: " + std::to_string(camera->position.x) + " " + std::to_string(camera->position.y) + " " + std::to_string(camera->position.z), 0, 33, 1,16, *Jupiteroid);
|
||||
J2D::DrawString(JGL::Colors::White, "ViewAngle: " + std::to_string(camera->angle.x) + " " + std::to_string(camera->angle.y) + " " + std::to_string(camera->angle.z), 0, 50, 1,16, *Jupiteroid);
|
||||
|
Reference in New Issue
Block a user