JustAnotherDnDGame 0.1.0
Jeu de rôle tactique au d20, vue de dessus, en C++/Qt
Loading...
Searching...
No Matches
TextRenderer.h File Reference

Composition d'une chaîne en quads sur le calque UI, en espace écran (LOT-52). More...

#include <cstdint>
#include <string_view>
#include <DirectXMath.h>
#include "Core/Ecs/Components/Sprite.h"
#include "HMI/Graphics/ComposedScene.h"
#include "HMI/Graphics/ProceduralFont.h"
#include "HMI/Graphics/RenderLayer.h"

Go to the source code of this file.

Classes

struct  hmi::TextAnchor
 Point d'ancrage d'un texte : quel coin/bord de sa boîte englobante coïncide avec la position passée à hmi::composeText — centrer un texte sans devoir le mesurer soi-même. More...

Namespaces

namespace  hmi

Enumerations

enum class  hmi::TextHorizontalAnchor { hmi::Left , hmi::Center , hmi::Right }
 Ancrage horizontal d'un texte composé (hmi::composeText). More...
enum class  hmi::TextVerticalAnchor { hmi::Top , hmi::Middle , hmi::Bottom }
 Ancrage vertical d'un texte composé (hmi::composeText). More...

Functions

DirectX::XMFLOAT4X4 hmi::screenProjectionMatrix (int viewportWidth, int viewportHeight) noexcept
 Construit la projection écran → clip du calque UI, indépendante de Camera2D.
void hmi::composeText (ComposedScene &scene, const FontMetrics &metrics, TextureHandle texture, int textureWidth, int textureHeight, std::string_view text, float x, float y, float scale, const core::Color &tint, TextAnchor anchor={}, std::int32_t sortOrder=0)
 Compose une chaîne en quads sur le calque UI, ancrée à une position écran.
void hmi::composeText (ComposedScene &scene, const BitmapFont &font, std::string_view text, float x, float y, float scale, const core::Color &tint, TextAnchor anchor={}, std::int32_t sortOrder=0)
 Raccourci de hmi::composeText prenant directement une hmi::BitmapFont.

Detailed Description

Composition d'une chaîne en quads sur le calque UI, en espace écran (LOT-52).