MAGE  v0.171.0
Matthias Advanced Game Engine
mage::rendering::SpriteFontDescriptor Class Reference

#include <sprite_font_descriptor.hpp>

Public Member Functions

constexpr SpriteFontDescriptor (bool force_srgb=false) noexcept
 
constexpr SpriteFontDescriptor (const SpriteFontDescriptor &desc) noexcept=default
 
constexpr SpriteFontDescriptor (SpriteFontDescriptor &&desc) noexcept=default
 
 ~SpriteFontDescriptor ()=default
 
SpriteFontDescriptoroperator= (const SpriteFontDescriptor &desc) noexcept=default
 
SpriteFontDescriptoroperator= (SpriteFontDescriptor &&desc) noexcept=default
 
constexpr bool ForceSRGB () const noexcept
 

Private Attributes

bool m_force_srgb
 

Detailed Description

A class of sprite font descriptors.

Constructor & Destructor Documentation

◆ SpriteFontDescriptor() [1/3]

constexpr mage::rendering::SpriteFontDescriptor::SpriteFontDescriptor ( bool  force_srgb = false)
explicitnoexcept

Constructs a sprite font descriptor.

Parameters
[in]force_srgbA flag indicating whether working around gamma issues is needed.

◆ SpriteFontDescriptor() [2/3]

constexpr mage::rendering::SpriteFontDescriptor::SpriteFontDescriptor ( const SpriteFontDescriptor desc)
defaultnoexcept

Constructs a sprite font descriptor from the given sprite font descriptor.

Parameters
[in]descA reference to the sprite font descriptor to copy.

◆ SpriteFontDescriptor() [3/3]

constexpr mage::rendering::SpriteFontDescriptor::SpriteFontDescriptor ( SpriteFontDescriptor &&  desc)
defaultnoexcept

Constructs a sprite font descriptor by moving the given sprite font descriptor.

Parameters
[in]descA reference to the sprite font descriptor to move.

◆ ~SpriteFontDescriptor()

mage::rendering::SpriteFontDescriptor::~SpriteFontDescriptor ( )
default

Destructs this sprite font descriptor.

Member Function Documentation

◆ ForceSRGB()

constexpr bool mage::rendering::SpriteFontDescriptor::ForceSRGB ( ) const
noexcept

Checks whether working around gamma issues is needed according to this sprite font descriptor.

Returns
true if working around gamma issues is needed. false if not.

◆ operator=() [1/2]

SpriteFontDescriptor& mage::rendering::SpriteFontDescriptor::operator= ( const SpriteFontDescriptor desc)
defaultnoexcept

Copies the given sprite font descriptor to this sprite font descriptor.

Parameters
[in]descA reference to the sprite font descriptor to copy.
Returns
A reference to the copy of the given sprite font descriptor (i.e. this sprite font descriptor).

◆ operator=() [2/2]

SpriteFontDescriptor& mage::rendering::SpriteFontDescriptor::operator= ( SpriteFontDescriptor &&  desc)
defaultnoexcept

Moves the given sprite font descriptor to this sprite font descriptor.

Parameters
[in]descA reference to the sprite font descriptor to move.
Returns
A reference to the moved sprite font descriptor (i.e. this sprite font descriptor).

Member Data Documentation

◆ m_force_srgb

bool mage::rendering::SpriteFontDescriptor::m_force_srgb
private

A flag indicating whether working around gamma issues is needed for this sprite font descriptor.

This is helpful for color fonts that are in the sRGB or similar color space but are not encoded explicitly as a SRGB format.