Literals namespace
Literals for primitives.
Functions
- auto operator""_rgb(unsigned long long value) -> Color constexpr
- 8bit-per-channel RGB color literal
- auto operator""_rgba(unsigned long long value) -> Color constexpr
- 8bit-per-channel RGBA color literal
- auto operator""_rgbf(unsigned long long value) -> Colorf constexpr
- Float RGB color literal.
- auto operator""_rgbaf(unsigned long long value) -> Colorf constexpr
- Float RGBA color literal.
- auto operator""_h(long double value) -> Half
- Half-float literal.
Function documentation
Color nCine:: Primitives:: Literals:: operator""_rgb(unsigned long long value) constexpr
#include <nCine/Primitives/Color.h>
8bit-per-channel RGB color literal
using namespace nCine::Primitives::Literals; Color a = 0x5eb233bb_rgb; // R: 0x5e, G: 0xb2, B: 0x33, A: 0xff
See Color for more information.
Color nCine:: Primitives:: Literals:: operator""_rgba(unsigned long long value) constexpr
#include <nCine/Primitives/Color.h>
8bit-per-channel RGBA color literal
using namespace nCine::Primitives::Literals; Color a = 0x5eb233bb_rgba; // R: 0x5e, G: 0xb2, B: 0x33, A: 0xbb
See Color for more information.
Colorf nCine:: Primitives:: Literals:: operator""_rgbf(unsigned long long value) constexpr
#include <nCine/Primitives/Colorf.h>
Float RGB color literal.
using namespace nCine::Primitives::Literals; Colorf a = 0x5eb233bb_rgbf; // R: 0x5e, G: 0xb2, B: 0x33, A: 0xff
See Colorf for more information.
Colorf nCine:: Primitives:: Literals:: operator""_rgbaf(unsigned long long value) constexpr
#include <nCine/Primitives/Colorf.h>
Float RGBA color literal.
using namespace nCine::Primitives::Literals; Colorf a = 0x5eb233bb_rgbaf; // R: 0x5e, G: 0xb2, B: 0x33, A: 0xbb
See Colorf for more information.
Half nCine:: Primitives:: Literals:: operator""_h(long double value)
#include <nCine/Primitives/Half.h>
Half-float literal.
using namespace nCine::Primitives::Literals; Half a = 3.1415_h;
See Half for more information.