xtd 0.2.0
color_converter.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "color.hpp"
7#include <xtd/static>
8
10namespace xtd {
12 namespace drawing {
25 public:
27
40 static xtd::drawing::color alpha_blend(const xtd::drawing::color& fore_core, const xtd::drawing::color& back_color, double alpha) noexcept;
41
53 static xtd::drawing::color average(const xtd::drawing::color& color1, const xtd::drawing::color& color2, double weight) noexcept;
65 static xtd::drawing::color average(const xtd::drawing::color& color1, const xtd::drawing::color& color2, double weight, bool average_alpha) noexcept;
66
73 static xtd::drawing::color bitonal(const drawing::color& color, int32 threshold, const drawing::color& upper_color, const drawing::color& lower_color) noexcept;
74
80 static xtd::drawing::color brightness(const xtd::drawing::color& color, double percent) noexcept;
81
87 static xtd::drawing::color color(const xtd::drawing::color& color, const xtd::drawing::color& value, double percent) noexcept;
88
95 static xtd::drawing::color color_extraction(const xtd::drawing::color& color, int32 threshold, const drawing::color& extraction_color, const xtd::drawing::color& other_color) noexcept;
96
103 static xtd::drawing::color color_substitution(const xtd::drawing::color& color, int32 threshold, const drawing::color& source_color, const xtd::drawing::color& new_color) noexcept;
104
110 static xtd::drawing::color contrast(const xtd::drawing::color& color, double percent) noexcept;
111
115 static xtd::drawing::color dark(const xtd::drawing::color& color) noexcept;
121 static xtd::drawing::color dark(const xtd::drawing::color& color, double percent) noexcept;
122
127 static xtd::drawing::color disabled(const xtd::drawing::color& fore_color, const xtd::drawing::color& back_color) noexcept;
132 static xtd::drawing::color disabled(const xtd::drawing::color& fore_color, float brightness) noexcept;
139 static xtd::drawing::color gamma_correction(const xtd::drawing::color& color, double r, double g, double b) noexcept;
140
144 static xtd::drawing::color grayscale(const xtd::drawing::color& color) noexcept;
150 static xtd::drawing::color grayscale(const xtd::drawing::color& color, double percent) noexcept;
151
156 static xtd::drawing::color hue_rotate(const xtd::drawing::color& color, int angle) noexcept;
157
161 static xtd::drawing::color invert(const xtd::drawing::color& color) noexcept;
166 static xtd::drawing::color invert(const xtd::drawing::color& color, double percent) noexcept;
167
171 static xtd::drawing::color light(const xtd::drawing::color& color) noexcept;
177 static xtd::drawing::color light(const xtd::drawing::color& color, double percent) noexcept;
178
184 static xtd::drawing::color saturate(const xtd::drawing::color& color, double percent) noexcept;
185
189 static xtd::drawing::color sepia(const xtd::drawing::color& color) noexcept;
195 static xtd::drawing::color sepia(const xtd::drawing::color& color, double percent) noexcept;
196
203 };
204 }
205}
Converts colors to and from xtd::drawing::color class. This class cannot be inherited.
Definition color_converter.hpp:24
static xtd::drawing::color threshold(const xtd::drawing::color &color, int32 threshold) noexcept
Creates a new black or white color of the specified color with specified threshold.
static xtd::drawing::color bitonal(const drawing::color &color, int32 threshold, const drawing::color &upper_color, const drawing::color &lower_color) noexcept
Creates a new lower or upper color of the specified color with specified threshold,...
static xtd::drawing::color average(const xtd::drawing::color &color1, const xtd::drawing::color &color2, double weight) noexcept
Returns the weighted average color between the two given colors.
static xtd::drawing::color average(const xtd::drawing::color &color1, const xtd::drawing::color &color2, double weight, bool average_alpha) noexcept
Returns the weighted average color between the two given colors.
static xtd::drawing::color alpha_blend(const xtd::drawing::color &fore_core, const xtd::drawing::color &back_color, double alpha) noexcept
Returns the weighted average color between the two given colors.
static xtd::drawing::color sepia(const xtd::drawing::color &color, double percent) noexcept
Creates a new color with brightness changed of the specified color with specified percent.
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:46
Contains xtd::drawing::color class.
Contains drawing_export_ keyword.
#define drawing_export_
Define shared library export.
Definition drawing_export.hpp:13
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:37
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
@ r
The R key.
Definition console_key.hpp:122
@ b
The B key.
Definition console_key.hpp:90
@ g
The G key.
Definition console_key.hpp:100
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8