This commit is contained in:
Ilusha 2024-03-16 12:07:49 +03:00
parent 65cb26a627
commit 1ead32d84a
71 changed files with 199 additions and 282 deletions

View file

@ -1,6 +1,7 @@
#include "GraphicsCommon.hpp"
#include "MathCommon.hpp"
namespace tp {
static ModuleManifest* deps[] = { &gModuleStrings, &gModuleMath, nullptr };
static ModuleManifest* deps[] = { &gModuleAllocators, nullptr };
ModuleManifest gModuleGraphics = ModuleManifest("Graphics", nullptr, nullptr, deps);
}

View file

@ -71,7 +71,7 @@ void Graphics::Canvas::popClamp() {
}
void Graphics::Canvas::text(
const String& string, const RectF& aRec, halnf size, Align align, halnf marging, const RGBA& col
const char* string, const RectF& aRec, halnf size, Align align, halnf marging, const RGBA& col
) {
RectF rec = { aRec.x + marging, aRec.y + marging, aRec.z - marging * 2, aRec.w - marging * 2 };
@ -107,7 +107,7 @@ void Graphics::Canvas::text(
nvgTextAlign(mContext->vg, alignNVG);
nvgText(mContext->vg, centerX, centerY, string.read(), nullptr);
nvgText(mContext->vg, centerX, centerY, string, nullptr);
popClamp();
}