xlnt
Public Member Functions | List of all members
xlnt::gradient_fill Class Reference

Encapsulates a fill which transitions between colors at particular "stops". More...

#include <fill.hpp>

Public Member Functions

 gradient_fill ()
 Constructs a default linear fill More...
 
gradient_fill_type type () const
 Returns the type of this gradient fill More...
 
gradient_filltype (gradient_fill_type new_type)
 Sets the type of this gradient fill More...
 
gradient_filldegree (double degree)
 Sets the angle of the gradient in degrees More...
 
double degree () const
 Returns the angle of the gradient More...
 
double left () const
 Returns the distance from the left where the gradient starts. More...
 
gradient_fillleft (double value)
 Sets the distance from the left where the gradient starts. More...
 
double right () const
 Returns the distance from the right where the gradient starts. More...
 
gradient_fillright (double value)
 Sets the distance from the right where the gradient starts. More...
 
double top () const
 Returns the distance from the top where the gradient starts. More...
 
gradient_filltop (double value)
 Sets the distance from the top where the gradient starts. More...
 
double bottom () const
 Returns the distance from the bottom where the gradient starts. More...
 
gradient_fillbottom (double value)
 Sets the distance from the bottom where the gradient starts. More...
 
gradient_filladd_stop (double position, color stop_color)
 Adds a gradient stop at position with the given color. More...
 
gradient_fillclear_stops ()
 Deletes all stops from the gradient. More...
 
std::unordered_map< double, colorstops () const
 Returns all of the gradient stops. More...
 
bool operator== (const gradient_fill &other) const
 Returns true if the gradient is equivalent to other. More...
 
bool operator!= (const gradient_fill &right) const
 Returns true if the gradient is not equivalent to other. More...
 

Detailed Description

Encapsulates a fill which transitions between colors at particular "stops".

Constructor & Destructor Documentation

◆ gradient_fill()

xlnt::gradient_fill::gradient_fill ( )

Constructs a default linear fill

Member Function Documentation

◆ add_stop()

gradient_fill& xlnt::gradient_fill::add_stop ( double  position,
color  stop_color 
)

Adds a gradient stop at position with the given color.

◆ bottom() [1/2]

double xlnt::gradient_fill::bottom ( ) const

Returns the distance from the bottom where the gradient starts.

◆ bottom() [2/2]

gradient_fill& xlnt::gradient_fill::bottom ( double  value)

Sets the distance from the bottom where the gradient starts.

◆ clear_stops()

gradient_fill& xlnt::gradient_fill::clear_stops ( )

Deletes all stops from the gradient.

◆ degree() [1/2]

gradient_fill& xlnt::gradient_fill::degree ( double  degree)

Sets the angle of the gradient in degrees

◆ degree() [2/2]

double xlnt::gradient_fill::degree ( ) const

Returns the angle of the gradient

◆ left() [1/2]

double xlnt::gradient_fill::left ( ) const

Returns the distance from the left where the gradient starts.

◆ left() [2/2]

gradient_fill& xlnt::gradient_fill::left ( double  value)

Sets the distance from the left where the gradient starts.

◆ operator!=()

bool xlnt::gradient_fill::operator!= ( const gradient_fill right) const

Returns true if the gradient is not equivalent to other.

◆ operator==()

bool xlnt::gradient_fill::operator== ( const gradient_fill other) const

Returns true if the gradient is equivalent to other.

◆ right() [1/2]

double xlnt::gradient_fill::right ( ) const

Returns the distance from the right where the gradient starts.

◆ right() [2/2]

gradient_fill& xlnt::gradient_fill::right ( double  value)

Sets the distance from the right where the gradient starts.

◆ stops()

std::unordered_map<double, color> xlnt::gradient_fill::stops ( ) const

Returns all of the gradient stops.

◆ top() [1/2]

double xlnt::gradient_fill::top ( ) const

Returns the distance from the top where the gradient starts.

◆ top() [2/2]

gradient_fill& xlnt::gradient_fill::top ( double  value)

Sets the distance from the top where the gradient starts.

◆ type() [1/2]

gradient_fill_type xlnt::gradient_fill::type ( ) const

Returns the type of this gradient fill

◆ type() [2/2]

gradient_fill& xlnt::gradient_fill::type ( gradient_fill_type  new_type)

Sets the type of this gradient fill


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