Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
|
#include "core/defines.hpp"
#include <cmath>
#include <fmt/format.h>
#include <iostream>
#include <optional>
Go to the source code of this file.
Namespaces | |
namespace | iv |
namespace | iv::color |
namespace | iv::color::utils |
namespace | iv::math |
namespace | iv::math::utils |
namespace | iv::time |
namespace | iv::time::utils |
namespace | iv::utils |
Macros | |
#define | TIME_IT(expr) |
Functions | |
template<typename T > requires ((std::is_floating_point_v<T> && std::numeric_limits<T>::is_iec559 && (std::numeric_limits<T>::radix == 2)) || (std::is_unsigned_v<T> && sizeof(T) == 1)) | |
iv::types::color | iv::color::utils::compactRgb (T r, T g, T b, T a) |
Returns an ARGB value according to the values given as unsigned char. | |
template<typename T > requires ((std::is_floating_point_v<T> && std::numeric_limits<T>::is_iec559 && (std::numeric_limits<T>::radix == 2)) || (std::is_unsigned_v<T> && sizeof(T) == 1)) | |
iv::types::color | iv::color::utils::compactRgb (T r, T g, T b) |
Returns an ARGB value according to the values given as unsigned char. | |
std::string | iv::color::utils::colorToHex (iv::types::color value, const bool hasAlpha) |
std::optional< iv::types::color > | iv::color::utils::hexToColor (const std::string_view hex) |
template<typename T > requires ((std::is_floating_point_v<T> && std::numeric_limits<T>::is_iec559 && (std::numeric_limits<T>::radix == 2)) || (std::is_unsigned_v<T> && sizeof(T) == 1)) | |
void | iv::color::utils::hexToBgr (iv::types::color hexValue, T *b_out, T *g_out, T *r_out, std::optional< T > alpha_out=std::nullopt) |
template<typename T > requires ((std::is_floating_point_v<T> && std::numeric_limits<T>::is_iec559 && (std::numeric_limits<T>::radix == 2)) || (std::is_unsigned_v<T> && sizeof(T) == 1)) | |
void | iv::color::utils::hexToRgb (iv::types::color hexValue, T *r_out, T *g_out, T *b_out, std::optional< std::reference_wrapper< T > > alpha_out=std::nullopt) |
template<typename T > requires ((std::is_floating_point_v<T> && std::numeric_limits<T>::is_iec559 && (std::numeric_limits<T>::radix == 2)) || (std::is_unsigned_v<T> && sizeof(T) == 1)) | |
void | iv::color::utils::rgbToHex (T r, T g, T b, T alpha, iv::types::color *hexValue_out) |
double | iv::color::utils::getAlpha (const iv::types::color hexValue) |
iv::types::color | iv::color::utils::removeAlpha (const iv::types::color hexValue) |
template<typename T > requires ((std::is_floating_point_v<T> && std::numeric_limits<T>::is_iec559 && (std::numeric_limits<T>::radix == 2)) || (std::is_unsigned_v<T> && sizeof(T) == 1)) | |
iv::types::color | iv::color::utils::addAlpha (iv::types::color hexValue, T alpha) |
template<typename T > requires ((std::is_floating_point_v<T> && std::numeric_limits<T>::is_iec559 && (std::numeric_limits<T>::radix == 2)) || (std::is_unsigned_v<T> && sizeof(T) == 1)) | |
iv::types::color | iv::color::utils::changeAlpha (iv::types::color hexValue, T alpha) |
iv::types::color | iv::color::utils::colorBorder (const iv::types::color colorState) |
Provides a border color. | |
uint32_t | iv::color::utils::darkenColorRgb (const uint32_t rgb, const double factorDarken) |
Get a darker version of the given RGB. | |
iv::types::color | iv::color::utils::darkenColorArgb (const iv::types::color argb, const double factorDarken) |
iv::types::color | iv::color::utils::illuminateColorRgb (const iv::types::color rgb, const double factorIlluminate) |
Get a brighter version of the given RGB. | |
bool | iv::color::utils::isDarkColorRgb (const uint32_t rgb) |
Check if the provided RGB is dark. | |
bool | iv::color::utils::isIlluminateColorRgb (const uint32_t rgb) |
Check if the provided RGB is illuminated. | |
void | iv::color::utils::getRgb2Char (iv::types::color color, unsigned char *r, unsigned char *g, unsigned char *b) |
Get unsigned char values from a 2 Bytes color. | |
template<typename T1 , typename T2 , typename T3 = double> requires std::is_arithmetic_v<T1> && std::is_arithmetic_v<T2> && std::is_arithmetic_v<T3> | |
bool | iv::math::utils::isEqual (T1 d1, T2 d2, T3 tolerance=iv::constants::maths::Precision) |
template<typename T > requires std::is_floating_point_v<T> | |
T | iv::math::utils::roundToDecimals (T value, uint8_t decimals) |
iv::types::timestamp | iv::time::utils::safeAbsoluteDiff (const iv::types::timestamp a, const iv::types::timestamp b) |
std::string | iv::time::utils::formatCalendarTimeFromMilliseconds (const iv::types::milliseconds timeInMilliseconds) |
std::string | iv::time::utils::formatTimeUnitsFromMilliseconds (iv::types::milliseconds timeInMilliseconds, bool isShortForm) |
uint8_t | iv::utils::maxBitsLength (const iv::eDataType dataType) |
#define TIME_IT | ( | expr | ) |