gempyre 1.8.7
Loading...
Searching...
No Matches
gempyre_bitmap.h File Reference
#include <string>
#include <algorithm>
#include <cstring>
#include <gempyre_types.h>
#include <array>
#include <optional>
#include <string_view>
#include <vector>
#include <type_traits>
Include dependency graph for gempyre_bitmap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Gempyre::Bitmap
 Bitmap for Gempyre Graphics. More...
 

Namespaces

namespace  Gempyre::Color
 RGB handling.
 

Macros

#define gempyre_graphics_assert(b, x)   ((b) || GempyreUtils::do_fatal(x, nullptr, __FILE__, __LINE__));
 

Typedefs

using Gempyre::Color::type = Gempyre::dataT
 pixel type
 

Functions

bool Gempyre::Color::is_equal (type a, type b)
 
std::optional< typeGempyre::Color::from_html_name (std::string_view name)
 find a HTML color as Color::type
 
std::optional< typeGempyre::Color::get_color (std::string_view color)
 get color from string, where string is a HTML color name, #RRGGBB, #RRGGBBAA, 0xRRGGBB or 0xRRGGBBAA
 
Gempyre::Color::type Gempyre::Color::hsl_to_rgb (double h, double s, double l, double alpha=1.0)
 HSL to HSV conversin, assumes all parameters [0,1].
 
Gempyre::Color::type Gempyre::Color::hsv_to_rgb (double h, double s, double l, double alpha=1.0)
 HSL to HSV conversin, assumes all parameters [0,1].
 
Gempyre::Color::type Gempyre::Color::get_distinct_color_hsv (unsigned pos, unsigned count, double alpha=1.0, double saturation=1.0, double value=0.6)
 get evenly generated color [pos, count], optional HSV parameters
 
auto Gempyre::Color::components (Gempyre::Color::type c)
 return r, g, b, a
 
Gempyre::Color::type Gempyre::Color::to_color (double r, double g, double b, double a=1.0)
 from double components [0, 1]
 
bool Gempyre::Color::is_look_same (Gempyre::Color::type a, Gempyre::Color::type b, double err=0.01)
 Compare colors and accept some error.
 

Variables

constexpr std::array< std::pair< std::string_view, type >, 147 > Gempyre::Color::html_colors
 HTML colors.
 

Detailed Description

wqe

gempyre_utils_graphics.h API for common graphics classes