Chronos 0.0
A advanced 2D rendering and animation system
Loading...
Searching...
No Matches
Chronos::Engine::TextParams Struct Reference

Parameters for rendering text. More...

#include <engineStructs.hpp>

Public Attributes

std::string text
 
float x = 0
 
float y = 0
 
float rotation = 0
 
float scale = 1.0f
 
std::array< float, 3 > color = { 1.0f, 1.0f, 1.0f }
 

Detailed Description

Parameters for rendering text.

This is the struct for the parameters of a Font. This is needed to create and modify a Font.

Note:

In Vulkan y axis is inverted. So the y axis of the shape is inverted. This means that -1 is the top of the screen and 1 is the bottom of the screen.

Parameters
xx coordinate of the text(Range : 0 and 1).
yy coordinate of the text(Range : 0 and 1).
rotationRotation of the text in degrees(Range: any float).
scaleScale of the text(Range : any float).
textThe text to render.
colorThe color of the text(Range : 0 and 1).

Definition at line 49 of file engineStructs.hpp.

Member Data Documentation

◆ color

std::array<float, 3> Chronos::Engine::TextParams::color = { 1.0f, 1.0f, 1.0f }

Definition at line 55 of file engineStructs.hpp.

55{ 1.0f, 1.0f, 1.0f };

◆ rotation

float Chronos::Engine::TextParams::rotation = 0

Definition at line 53 of file engineStructs.hpp.

◆ scale

float Chronos::Engine::TextParams::scale = 1.0f

Definition at line 54 of file engineStructs.hpp.

◆ text

std::string Chronos::Engine::TextParams::text

Definition at line 50 of file engineStructs.hpp.

◆ x

float Chronos::Engine::TextParams::x = 0

Definition at line 51 of file engineStructs.hpp.

◆ y

float Chronos::Engine::TextParams::y = 0

Definition at line 52 of file engineStructs.hpp.


The documentation for this struct was generated from the following file: