![]() |
neoGFX
Cross-platform C++ app/game engine
|
#include <color.hpp>
Classes | |
| struct | bad_position |
Public Types | |
| typedef neolib::variant< corner, double > | orientation_type |
| typedef std::pair< double, color > | color_stop |
| typedef std::vector< color_stop > | color_stop_list |
| typedef std::pair< double, color::component > | alpha_stop |
| typedef std::vector< alpha_stop > | alpha_stop_list |
Public Member Functions | |
| gradient () | |
| gradient (const gradient &aOther) | |
| gradient (const color &aColor) | |
| gradient (const color &aColor, gradient_direction aDirection) | |
| gradient (const color &aColor1, const color &aColor2, gradient_direction aDirection=gradient_direction::Vertical) | |
| gradient (const color_stop_list &aColorStops, gradient_direction aDirection=gradient_direction::Vertical) | |
| gradient (const color_stop_list &aColorStops, const alpha_stop_list &aAlphaStops, gradient_direction aDirection=gradient_direction::Vertical) | |
| gradient (const gradient &aOther, const color_stop_list &aColorStops, const alpha_stop_list &aAlphaStops) | |
| gradient (const std::initializer_list< color > &aColors, gradient_direction aDirection=gradient_direction::Vertical) | |
| bool | use_cache () const |
| void | set_cache_usage (bool aUseCache) |
| color_stop_list::const_iterator | color_begin () const |
| color_stop_list::const_iterator | color_end () const |
| alpha_stop_list::const_iterator | alpha_begin () const |
| alpha_stop_list::const_iterator | alpha_end () const |
| color_stop_list::iterator | color_begin () |
| color_stop_list::iterator | color_end () |
| alpha_stop_list::iterator | alpha_begin () |
| alpha_stop_list::iterator | alpha_end () |
| color_stop_list::iterator | find_color_stop (double aPos, bool aToInsert=false) |
| color_stop_list::iterator | find_color_stop (double aPos, double aStart, double aEnd, bool aToInsert=false) |
| alpha_stop_list::iterator | find_alpha_stop (double aPos, bool aToInsert=false) |
| alpha_stop_list::iterator | find_alpha_stop (double aPos, double aStart, double aEnd, bool aToInsert=false) |
| color_stop_list::iterator | insert_color_stop (double aPos) |
| color_stop_list::iterator | insert_color_stop (double aPos, double aStart, double aEnd) |
| alpha_stop_list::iterator | insert_alpha_stop (double aPos) |
| alpha_stop_list::iterator | insert_alpha_stop (double aPos, double aStart, double aEnd) |
| void | erase_stop (color_stop_list::iterator aStop) |
| void | erase_stop (alpha_stop_list::iterator aStop) |
| std::size_t | color_stop_count () const |
| std::size_t | alpha_stop_count () const |
| color_stop_list | combined_stops () const |
| color | at (double aPos) const |
| color | at (double aPos, double aStart, double aEnd) const |
| color | color_at (double aPos) const |
| color | color_at (double aPos, double aStart, double aEnd) const |
| color::component | alpha_at (double aPos) const |
| color::component | alpha_at (double aPos, double aStart, double aEnd) const |
| gradient | reversed () const |
| template<typename T > | |
| gradient | with_alpha (T aAlpha, std::enable_if_t< std::is_floating_point_v< T >, sfinae >={}) |
| gradient | with_alpha (color::component aAlpha) const |
| template<typename T > | |
| gradient | with_combined_alpha (T aAlpha, std::enable_if_t< std::is_floating_point_v< T >, sfinae >={}) |
| gradient | with_combined_alpha (color::component aAlpha) const |
| gradient_direction | direction () const |
| void | set_direction (gradient_direction aDirection) |
| gradient | with_direction (gradient_direction aDirection) const |
| orientation_type | orientation () const |
| void | set_orientation (orientation_type aOrientation) |
| gradient | with_orientation (orientation_type aOrientation) const |
| gradient_shape | shape () const |
| void | set_shape (gradient_shape aShape) |
| gradient | with_shape (gradient_shape aShape) const |
| gradient_size | size () const |
| void | set_size (gradient_size aSize) |
| gradient | with_size (gradient_size aSize) const |
| const optional_vec2 & | exponents () const |
| void | set_exponents (const optional_vec2 &aExponents) |
| gradient | with_exponents (const optional_vec2 &aExponents) const |
| const optional_point & | centre () const |
| void | set_centre (const optional_point &aCentre) |
| gradient | with_centre (const optional_point &aCentre) const |
| double | smoothness () const |
| void | set_smoothness (double aSmoothness) |
| gradient | with_smoothness (double aSmoothness) const |
| bool | operator== (const gradient &aOther) const |
| bool | operator!= (const gradient &aOther) const |
| bool | operator< (const gradient &aOther) const |
Static Public Member Functions | |
| static double | normalized_position (double aPos, double aStart, double aEnd) |
Static Public Attributes | |
| static const std::uint32_t | MaxStops = 256 |
| typedef std::pair<double, color::component> neogfx::gradient::alpha_stop |
| typedef std::vector<alpha_stop> neogfx::gradient::alpha_stop_list |
| typedef std::pair<double, color> neogfx::gradient::color_stop |
| typedef std::vector<color_stop> neogfx::gradient::color_stop_list |
| typedef neolib::variant<corner, double> neogfx::gradient::orientation_type |
| neogfx::gradient::gradient | ( | ) |
| neogfx::gradient::gradient | ( | const gradient & | aOther | ) |
|
explicit |
| neogfx::gradient::gradient | ( | const color & | aColor, |
| gradient_direction | aDirection | ||
| ) |
| neogfx::gradient::gradient | ( | const color & | aColor1, |
| const color & | aColor2, | ||
| gradient_direction | aDirection = gradient_direction::Vertical |
||
| ) |
| neogfx::gradient::gradient | ( | const color_stop_list & | aColorStops, |
| gradient_direction | aDirection = gradient_direction::Vertical |
||
| ) |
| neogfx::gradient::gradient | ( | const color_stop_list & | aColorStops, |
| const alpha_stop_list & | aAlphaStops, | ||
| gradient_direction | aDirection = gradient_direction::Vertical |
||
| ) |
| neogfx::gradient::gradient | ( | const gradient & | aOther, |
| const color_stop_list & | aColorStops, | ||
| const alpha_stop_list & | aAlphaStops | ||
| ) |
| neogfx::gradient::gradient | ( | const std::initializer_list< color > & | aColors, |
| gradient_direction | aDirection = gradient_direction::Vertical |
||
| ) |
| color::component neogfx::gradient::alpha_at | ( | double | aPos | ) | const |
| color::component neogfx::gradient::alpha_at | ( | double | aPos, |
| double | aStart, | ||
| double | aEnd | ||
| ) | const |
| alpha_stop_list::const_iterator neogfx::gradient::alpha_begin | ( | ) | const |
| alpha_stop_list::iterator neogfx::gradient::alpha_begin | ( | ) |
| alpha_stop_list::const_iterator neogfx::gradient::alpha_end | ( | ) | const |
| alpha_stop_list::iterator neogfx::gradient::alpha_end | ( | ) |
| std::size_t neogfx::gradient::alpha_stop_count | ( | ) | const |
| color neogfx::gradient::at | ( | double | aPos | ) | const |
| color neogfx::gradient::at | ( | double | aPos, |
| double | aStart, | ||
| double | aEnd | ||
| ) | const |
| const optional_point& neogfx::gradient::centre | ( | ) | const |
| color neogfx::gradient::color_at | ( | double | aPos | ) | const |
| color neogfx::gradient::color_at | ( | double | aPos, |
| double | aStart, | ||
| double | aEnd | ||
| ) | const |
| color_stop_list::const_iterator neogfx::gradient::color_begin | ( | ) | const |
| color_stop_list::iterator neogfx::gradient::color_begin | ( | ) |
| color_stop_list::const_iterator neogfx::gradient::color_end | ( | ) | const |
| color_stop_list::iterator neogfx::gradient::color_end | ( | ) |
| std::size_t neogfx::gradient::color_stop_count | ( | ) | const |
| color_stop_list neogfx::gradient::combined_stops | ( | ) | const |
| gradient_direction neogfx::gradient::direction | ( | ) | const |
| void neogfx::gradient::erase_stop | ( | color_stop_list::iterator | aStop | ) |
| void neogfx::gradient::erase_stop | ( | alpha_stop_list::iterator | aStop | ) |
| const optional_vec2& neogfx::gradient::exponents | ( | ) | const |
| alpha_stop_list::iterator neogfx::gradient::find_alpha_stop | ( | double | aPos, |
| bool | aToInsert = false |
||
| ) |
| alpha_stop_list::iterator neogfx::gradient::find_alpha_stop | ( | double | aPos, |
| double | aStart, | ||
| double | aEnd, | ||
| bool | aToInsert = false |
||
| ) |
| color_stop_list::iterator neogfx::gradient::find_color_stop | ( | double | aPos, |
| bool | aToInsert = false |
||
| ) |
| color_stop_list::iterator neogfx::gradient::find_color_stop | ( | double | aPos, |
| double | aStart, | ||
| double | aEnd, | ||
| bool | aToInsert = false |
||
| ) |
| alpha_stop_list::iterator neogfx::gradient::insert_alpha_stop | ( | double | aPos | ) |
| alpha_stop_list::iterator neogfx::gradient::insert_alpha_stop | ( | double | aPos, |
| double | aStart, | ||
| double | aEnd | ||
| ) |
| color_stop_list::iterator neogfx::gradient::insert_color_stop | ( | double | aPos | ) |
| color_stop_list::iterator neogfx::gradient::insert_color_stop | ( | double | aPos, |
| double | aStart, | ||
| double | aEnd | ||
| ) |
|
static |
| bool neogfx::gradient::operator!= | ( | const gradient & | aOther | ) | const |
| bool neogfx::gradient::operator< | ( | const gradient & | aOther | ) | const |
| bool neogfx::gradient::operator== | ( | const gradient & | aOther | ) | const |
| orientation_type neogfx::gradient::orientation | ( | ) | const |
| gradient neogfx::gradient::reversed | ( | ) | const |
| void neogfx::gradient::set_cache_usage | ( | bool | aUseCache | ) |
| void neogfx::gradient::set_centre | ( | const optional_point & | aCentre | ) |
| void neogfx::gradient::set_direction | ( | gradient_direction | aDirection | ) |
| void neogfx::gradient::set_exponents | ( | const optional_vec2 & | aExponents | ) |
| void neogfx::gradient::set_orientation | ( | orientation_type | aOrientation | ) |
| void neogfx::gradient::set_shape | ( | gradient_shape | aShape | ) |
| void neogfx::gradient::set_size | ( | gradient_size | aSize | ) |
| void neogfx::gradient::set_smoothness | ( | double | aSmoothness | ) |
| gradient_shape neogfx::gradient::shape | ( | ) | const |
| gradient_size neogfx::gradient::size | ( | ) | const |
| double neogfx::gradient::smoothness | ( | ) | const |
| bool neogfx::gradient::use_cache | ( | ) | const |
| gradient neogfx::gradient::with_alpha | ( | color::component | aAlpha | ) | const |
| gradient neogfx::gradient::with_centre | ( | const optional_point & | aCentre | ) | const |
| gradient neogfx::gradient::with_combined_alpha | ( | color::component | aAlpha | ) | const |
| gradient neogfx::gradient::with_direction | ( | gradient_direction | aDirection | ) | const |
| gradient neogfx::gradient::with_exponents | ( | const optional_vec2 & | aExponents | ) | const |
| gradient neogfx::gradient::with_orientation | ( | orientation_type | aOrientation | ) | const |
| gradient neogfx::gradient::with_shape | ( | gradient_shape | aShape | ) | const |
| gradient neogfx::gradient::with_size | ( | gradient_size | aSize | ) | const |
| gradient neogfx::gradient::with_smoothness | ( | double | aSmoothness | ) | const |
|
static |