neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::basic_gradient< Sharing > Class Template Reference

#include <gradient.hpp>

Inheritance diagram for neogfx::basic_gradient< Sharing >:
neolib::reference_counted< Base, DeallocateOnRelease >

Public Types

typedef basic_gradient< Sharing > self_type
 
typedef i_gradient abstract_type
 
typedef neolib::pair< scalar, sRGB_colorcolor_stop
 
typedef neolib::pair< scalar, sRGB_color::view_componentalpha_stop
 
typedef neolib::vector< color_stopcolor_stop_list
 
typedef neolib::vector< alpha_stopalpha_stop_list
 
typedef color_stop_list::abstract_type abstract_color_stop_list
 
typedef alpha_stop_list::abstract_type abstract_alpha_stop_list
 

Public Member Functions

 basic_gradient ()
 
 basic_gradient (const basic_gradient &aOther)
 
 basic_gradient (const i_gradient &aOther)
 
 basic_gradient (const i_ref_ptr< i_gradient > &aObject)
 
 basic_gradient (const i_string &aCssDeclaration)
 
 basic_gradient (const sRGB_color &aColor)
 
 basic_gradient (const sRGB_color &aColor, gradient_direction aDirection)
 
 basic_gradient (const sRGB_color &aColor1, const sRGB_color &aColor2, gradient_direction aDirection=gradient_direction::Vertical)
 
 basic_gradient (const abstract_color_stop_list &aColorStops, gradient_direction aDirection=gradient_direction::Vertical)
 
 basic_gradient (const abstract_color_stop_list &aColorStops, const abstract_alpha_stop_list &aAlphaStops, gradient_direction aDirection=gradient_direction::Vertical)
 
 basic_gradient (const basic_gradient &aOther, const abstract_color_stop_list &aColorStops)
 
 basic_gradient (const basic_gradient &aOther, const abstract_color_stop_list &aColorStops, const abstract_alpha_stop_list &aAlphaStops)
 
 basic_gradient (const neolib::i_vector< sRGB_color::abstract_type > &aColors, gradient_direction aDirection=gradient_direction::Vertical)
 
 basic_gradient (const std::initializer_list< sRGB_color > &aColors, gradient_direction aDirection=gradient_direction::Vertical)
 
basic_gradientoperator= (const i_gradient &aOther) override
 
void clone (neolib::i_ref_ptr< i_gradient > &aResult) const override
 
gradient_id id () const override
 
bool is_singular () const override
 
abstract_color_stop_list const & color_stops () const override
 
abstract_color_stop_listcolor_stops () override
 
abstract_alpha_stop_list const & alpha_stops () const override
 
abstract_alpha_stop_listalpha_stops () override
 
abstract_color_stop_list::const_iterator find_color_stop (scalar aPos, bool aToInsert=false) const override
 
abstract_color_stop_list::const_iterator find_color_stop (scalar aPos, scalar aStart, scalar aEnd, bool aToInsert=false) const override
 
abstract_alpha_stop_list::const_iterator find_alpha_stop (scalar aPos, bool aToInsert=false) const override
 
abstract_alpha_stop_list::const_iterator find_alpha_stop (scalar aPos, scalar aStart, scalar aEnd, bool aToInsert=false) const override
 
abstract_color_stop_list::iterator find_color_stop (scalar aPos, bool aToInsert=false) override
 
abstract_color_stop_list::iterator find_color_stop (scalar aPos, scalar aStart, scalar aEnd, bool aToInsert=false) override
 
abstract_alpha_stop_list::iterator find_alpha_stop (scalar aPos, bool aToInsert=false) override
 
abstract_alpha_stop_list::iterator find_alpha_stop (scalar aPos, scalar aStart, scalar aEnd, bool aToInsert=false) override
 
abstract_color_stop_list::iterator insert_color_stop (scalar aPos) override
 
abstract_color_stop_list::iterator insert_color_stop (scalar aPos, scalar aStart, scalar aEnd) override
 
abstract_alpha_stop_list::iterator insert_alpha_stop (scalar aPos) override
 
abstract_alpha_stop_list::iterator insert_alpha_stop (scalar aPos, scalar aStart, scalar aEnd) override
 
sRGB_color at (scalar aPos) const override
 
sRGB_color at (scalar aPos, scalar aStart, scalar aEnd) const override
 
sRGB_color color_at (scalar aPos) const override
 
sRGB_color color_at (scalar aPos, scalar aStart, scalar aEnd) const override
 
sRGB_color::view_component alpha_at (scalar aPos) const override
 
sRGB_color::view_component alpha_at (scalar aPos, scalar aStart, scalar aEnd) const override
 
self_typereverse () override
 
self_typeset_alpha (sRGB_color::view_component aAlpha) override
 
self_typeset_combined_alpha (sRGB_color::view_component aAlpha) override
 
gradient_direction direction () const override
 
self_typeset_direction (gradient_direction aDirection) override
 
gradient_orientation orientation () const override
 
self_typeset_orientation (gradient_orientation aOrientation) override
 
gradient_shape shape () const override
 
self_typeset_shape (gradient_shape aShape) override
 
gradient_size size () const override
 
self_typeset_size (gradient_size aSize) override
 
const optional_vec2exponents () const override
 
self_typeset_exponents (const optional_vec2 &aExponents) override
 
const optional_pointcenter () const override
 
self_typeset_center (const optional_point &aCenter) override
 
const std::optional< gradient_tile > & tile () const override
 
self_typeset_tile (const std::optional< gradient_tile > &aTile) override
 
scalar smoothness () const override
 
self_typeset_smoothness (scalar aSmoothness) override
 
const optional_rectbounding_box () const override
 
self_typeset_bounding_box (const optional_rect &aBoundingBox) override
 
self_typeset_bounding_box_if_none (const optional_rect &aBoundingBox) override
 
self_type with_bounding_box (const optional_rect &aBoundingBox) const
 
self_type with_bounding_box_if_none (const optional_rect &aBoundingBox) const
 
const i_gradient_sampler & colors () const override
 
const i_gradient_filter & filter () const override
 
- Public Member Functions inherited from neolib::reference_counted< Base, DeallocateOnRelease >
 reference_counted () noexcept
 
 reference_counted (const reference_counted &aOther) noexcept
 
 ~reference_counted ()
 
reference_countedoperator= (const reference_counted &)
 
void add_ref () const noexcept override
 
void release () const override
 
int32_t use_count () const noexcept override
 
const base_type * release_and_take_ownership () const override
 
base_type * release_and_take_ownership () override
 
void pin () const noexcept override
 
void unpin () const override
 
i_ref_control_blockcontrol_block () override
 

Detailed Description

template<gradient_sharing Sharing>
class neogfx::basic_gradient< Sharing >

Definition at line 30 of file gradient.hpp.

Member Typedef Documentation

◆ abstract_alpha_stop_list

template<gradient_sharing Sharing>
typedef alpha_stop_list::abstract_type neogfx::basic_gradient< Sharing >::abstract_alpha_stop_list

Definition at line 41 of file gradient.hpp.

◆ abstract_color_stop_list

template<gradient_sharing Sharing>
typedef color_stop_list::abstract_type neogfx::basic_gradient< Sharing >::abstract_color_stop_list

Definition at line 40 of file gradient.hpp.

◆ abstract_type

template<gradient_sharing Sharing>
typedef i_gradient neogfx::basic_gradient< Sharing >::abstract_type

Definition at line 35 of file gradient.hpp.

◆ alpha_stop

template<gradient_sharing Sharing>
typedef neolib::pair<scalar, sRGB_color::view_component> neogfx::basic_gradient< Sharing >::alpha_stop

Definition at line 37 of file gradient.hpp.

◆ alpha_stop_list

template<gradient_sharing Sharing>
typedef neolib::vector<alpha_stop> neogfx::basic_gradient< Sharing >::alpha_stop_list

Definition at line 39 of file gradient.hpp.

◆ color_stop

template<gradient_sharing Sharing>
typedef neolib::pair<scalar, sRGB_color> neogfx::basic_gradient< Sharing >::color_stop

Definition at line 36 of file gradient.hpp.

◆ color_stop_list

template<gradient_sharing Sharing>
typedef neolib::vector<color_stop> neogfx::basic_gradient< Sharing >::color_stop_list

Definition at line 38 of file gradient.hpp.

◆ self_type

template<gradient_sharing Sharing>
typedef basic_gradient<Sharing> neogfx::basic_gradient< Sharing >::self_type

Definition at line 34 of file gradient.hpp.

Constructor & Destructor Documentation

◆ basic_gradient() [1/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( )

◆ basic_gradient() [2/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const basic_gradient< Sharing > &  aOther)

◆ basic_gradient() [3/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const i_gradient &  aOther)

◆ basic_gradient() [4/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const i_ref_ptr< i_gradient > &  aObject)

◆ basic_gradient() [5/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const i_string aCssDeclaration)
explicit

◆ basic_gradient() [6/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const sRGB_color aColor)
explicit

◆ basic_gradient() [7/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const sRGB_color aColor,
gradient_direction  aDirection 
)

◆ basic_gradient() [8/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const sRGB_color aColor1,
const sRGB_color aColor2,
gradient_direction  aDirection = gradient_direction::Vertical 
)

◆ basic_gradient() [9/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const abstract_color_stop_list aColorStops,
gradient_direction  aDirection = gradient_direction::Vertical 
)

◆ basic_gradient() [10/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const abstract_color_stop_list aColorStops,
const abstract_alpha_stop_list aAlphaStops,
gradient_direction  aDirection = gradient_direction::Vertical 
)

◆ basic_gradient() [11/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const basic_gradient< Sharing > &  aOther,
const abstract_color_stop_list aColorStops 
)

◆ basic_gradient() [12/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const basic_gradient< Sharing > &  aOther,
const abstract_color_stop_list aColorStops,
const abstract_alpha_stop_list aAlphaStops 
)

◆ basic_gradient() [13/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const neolib::i_vector< sRGB_color::abstract_type > &  aColors,
gradient_direction  aDirection = gradient_direction::Vertical 
)

◆ basic_gradient() [14/14]

template<gradient_sharing Sharing>
neogfx::basic_gradient< Sharing >::basic_gradient ( const std::initializer_list< sRGB_color > &  aColors,
gradient_direction  aDirection = gradient_direction::Vertical 
)

Member Function Documentation

◆ alpha_at() [1/2]

template<gradient_sharing Sharing>
sRGB_color::view_component neogfx::basic_gradient< Sharing >::alpha_at ( scalar  aPos) const
override

◆ alpha_at() [2/2]

template<gradient_sharing Sharing>
sRGB_color::view_component neogfx::basic_gradient< Sharing >::alpha_at ( scalar  aPos,
scalar  aStart,
scalar  aEnd 
) const
override

◆ alpha_stops() [1/2]

template<gradient_sharing Sharing>
abstract_alpha_stop_list const & neogfx::basic_gradient< Sharing >::alpha_stops ( ) const
override

◆ alpha_stops() [2/2]

template<gradient_sharing Sharing>
abstract_alpha_stop_list & neogfx::basic_gradient< Sharing >::alpha_stops ( )
override

◆ at() [1/2]

template<gradient_sharing Sharing>
sRGB_color neogfx::basic_gradient< Sharing >::at ( scalar  aPos) const
override

◆ at() [2/2]

template<gradient_sharing Sharing>
sRGB_color neogfx::basic_gradient< Sharing >::at ( scalar  aPos,
scalar  aStart,
scalar  aEnd 
) const
override

◆ bounding_box()

template<gradient_sharing Sharing>
const optional_rect & neogfx::basic_gradient< Sharing >::bounding_box ( ) const
override

◆ center()

template<gradient_sharing Sharing>
const optional_point & neogfx::basic_gradient< Sharing >::center ( ) const
override

◆ clone()

template<gradient_sharing Sharing>
void neogfx::basic_gradient< Sharing >::clone ( neolib::i_ref_ptr< i_gradient > &  aResult) const
override

◆ color_at() [1/2]

template<gradient_sharing Sharing>
sRGB_color neogfx::basic_gradient< Sharing >::color_at ( scalar  aPos) const
override

◆ color_at() [2/2]

template<gradient_sharing Sharing>
sRGB_color neogfx::basic_gradient< Sharing >::color_at ( scalar  aPos,
scalar  aStart,
scalar  aEnd 
) const
override

◆ color_stops() [1/2]

template<gradient_sharing Sharing>
abstract_color_stop_list const & neogfx::basic_gradient< Sharing >::color_stops ( ) const
override

◆ color_stops() [2/2]

template<gradient_sharing Sharing>
abstract_color_stop_list & neogfx::basic_gradient< Sharing >::color_stops ( )
override

◆ colors()

template<gradient_sharing Sharing>
const i_gradient_sampler & neogfx::basic_gradient< Sharing >::colors ( ) const
override

◆ direction()

template<gradient_sharing Sharing>
gradient_direction neogfx::basic_gradient< Sharing >::direction ( ) const
override

◆ exponents()

template<gradient_sharing Sharing>
const optional_vec2 & neogfx::basic_gradient< Sharing >::exponents ( ) const
override

◆ filter()

template<gradient_sharing Sharing>
const i_gradient_filter & neogfx::basic_gradient< Sharing >::filter ( ) const
override

◆ find_alpha_stop() [1/4]

template<gradient_sharing Sharing>
abstract_alpha_stop_list::const_iterator neogfx::basic_gradient< Sharing >::find_alpha_stop ( scalar  aPos,
bool  aToInsert = false 
) const
override

◆ find_alpha_stop() [2/4]

template<gradient_sharing Sharing>
abstract_alpha_stop_list::iterator neogfx::basic_gradient< Sharing >::find_alpha_stop ( scalar  aPos,
bool  aToInsert = false 
)
override

◆ find_alpha_stop() [3/4]

template<gradient_sharing Sharing>
abstract_alpha_stop_list::const_iterator neogfx::basic_gradient< Sharing >::find_alpha_stop ( scalar  aPos,
scalar  aStart,
scalar  aEnd,
bool  aToInsert = false 
) const
override

◆ find_alpha_stop() [4/4]

template<gradient_sharing Sharing>
abstract_alpha_stop_list::iterator neogfx::basic_gradient< Sharing >::find_alpha_stop ( scalar  aPos,
scalar  aStart,
scalar  aEnd,
bool  aToInsert = false 
)
override

◆ find_color_stop() [1/4]

template<gradient_sharing Sharing>
abstract_color_stop_list::const_iterator neogfx::basic_gradient< Sharing >::find_color_stop ( scalar  aPos,
bool  aToInsert = false 
) const
override

◆ find_color_stop() [2/4]

template<gradient_sharing Sharing>
abstract_color_stop_list::iterator neogfx::basic_gradient< Sharing >::find_color_stop ( scalar  aPos,
bool  aToInsert = false 
)
override

◆ find_color_stop() [3/4]

template<gradient_sharing Sharing>
abstract_color_stop_list::const_iterator neogfx::basic_gradient< Sharing >::find_color_stop ( scalar  aPos,
scalar  aStart,
scalar  aEnd,
bool  aToInsert = false 
) const
override

◆ find_color_stop() [4/4]

template<gradient_sharing Sharing>
abstract_color_stop_list::iterator neogfx::basic_gradient< Sharing >::find_color_stop ( scalar  aPos,
scalar  aStart,
scalar  aEnd,
bool  aToInsert = false 
)
override

◆ id()

template<gradient_sharing Sharing>
gradient_id neogfx::basic_gradient< Sharing >::id ( ) const
override

◆ insert_alpha_stop() [1/2]

template<gradient_sharing Sharing>
abstract_alpha_stop_list::iterator neogfx::basic_gradient< Sharing >::insert_alpha_stop ( scalar  aPos)
override

◆ insert_alpha_stop() [2/2]

template<gradient_sharing Sharing>
abstract_alpha_stop_list::iterator neogfx::basic_gradient< Sharing >::insert_alpha_stop ( scalar  aPos,
scalar  aStart,
scalar  aEnd 
)
override

◆ insert_color_stop() [1/2]

template<gradient_sharing Sharing>
abstract_color_stop_list::iterator neogfx::basic_gradient< Sharing >::insert_color_stop ( scalar  aPos)
override

◆ insert_color_stop() [2/2]

template<gradient_sharing Sharing>
abstract_color_stop_list::iterator neogfx::basic_gradient< Sharing >::insert_color_stop ( scalar  aPos,
scalar  aStart,
scalar  aEnd 
)
override

◆ is_singular()

template<gradient_sharing Sharing>
bool neogfx::basic_gradient< Sharing >::is_singular ( ) const
override

◆ operator=()

template<gradient_sharing Sharing>
basic_gradient & neogfx::basic_gradient< Sharing >::operator= ( const i_gradient &  aOther)
override

◆ orientation()

template<gradient_sharing Sharing>
gradient_orientation neogfx::basic_gradient< Sharing >::orientation ( ) const
override

◆ reverse()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::reverse ( )
override

◆ set_alpha()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_alpha ( sRGB_color::view_component  aAlpha)
override

◆ set_bounding_box()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_bounding_box ( const optional_rect aBoundingBox)
override

◆ set_bounding_box_if_none()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_bounding_box_if_none ( const optional_rect aBoundingBox)
override

◆ set_center()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_center ( const optional_point aCenter)
override

◆ set_combined_alpha()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_combined_alpha ( sRGB_color::view_component  aAlpha)
override

◆ set_direction()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_direction ( gradient_direction  aDirection)
override

◆ set_exponents()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_exponents ( const optional_vec2 aExponents)
override

◆ set_orientation()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_orientation ( gradient_orientation  aOrientation)
override

◆ set_shape()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_shape ( gradient_shape  aShape)
override

◆ set_size()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_size ( gradient_size  aSize)
override

◆ set_smoothness()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_smoothness ( scalar  aSmoothness)
override

◆ set_tile()

template<gradient_sharing Sharing>
self_type & neogfx::basic_gradient< Sharing >::set_tile ( const std::optional< gradient_tile > &  aTile)
override

◆ shape()

template<gradient_sharing Sharing>
gradient_shape neogfx::basic_gradient< Sharing >::shape ( ) const
override

◆ size()

template<gradient_sharing Sharing>
gradient_size neogfx::basic_gradient< Sharing >::size ( ) const
override

◆ smoothness()

template<gradient_sharing Sharing>
scalar neogfx::basic_gradient< Sharing >::smoothness ( ) const
override

◆ tile()

template<gradient_sharing Sharing>
const std::optional< gradient_tile > & neogfx::basic_gradient< Sharing >::tile ( ) const
override

◆ with_bounding_box()

template<gradient_sharing Sharing>
self_type neogfx::basic_gradient< Sharing >::with_bounding_box ( const optional_rect aBoundingBox) const
inline

Definition at line 114 of file gradient.hpp.

◆ with_bounding_box_if_none()

template<gradient_sharing Sharing>
self_type neogfx::basic_gradient< Sharing >::with_bounding_box_if_none ( const optional_rect aBoundingBox) const
inline

Definition at line 120 of file gradient.hpp.


The documentation for this class was generated from the following file: