xlnt
|
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_fill & | type (gradient_fill_type new_type) |
Sets the type of this gradient fill More... | |
gradient_fill & | degree (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_fill & | left (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_fill & | right (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_fill & | top (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_fill & | bottom (double value) |
Sets the distance from the bottom where the gradient starts. More... | |
gradient_fill & | add_stop (double position, color stop_color) |
Adds a gradient stop at position with the given color. More... | |
gradient_fill & | clear_stops () |
Deletes all stops from the gradient. More... | |
std::unordered_map< double, color > | stops () 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... | |
Encapsulates a fill which transitions between colors at particular "stops".
xlnt::gradient_fill::gradient_fill | ( | ) |
Constructs a default linear fill
gradient_fill& xlnt::gradient_fill::add_stop | ( | double | position, |
color | stop_color | ||
) |
Adds a gradient stop at position with the given color.
double xlnt::gradient_fill::bottom | ( | ) | const |
Returns the distance from the bottom where the gradient starts.
gradient_fill& xlnt::gradient_fill::bottom | ( | double | value | ) |
Sets the distance from the bottom where the gradient starts.
gradient_fill& xlnt::gradient_fill::clear_stops | ( | ) |
Deletes all stops from the gradient.
gradient_fill& xlnt::gradient_fill::degree | ( | double | degree | ) |
Sets the angle of the gradient in degrees
double xlnt::gradient_fill::degree | ( | ) | const |
Returns the angle of the gradient
double xlnt::gradient_fill::left | ( | ) | const |
Returns the distance from the left where the gradient starts.
gradient_fill& xlnt::gradient_fill::left | ( | double | value | ) |
Sets the distance from the left where the gradient starts.
bool xlnt::gradient_fill::operator!= | ( | const gradient_fill & | right | ) | const |
Returns true if the gradient is not equivalent to other.
bool xlnt::gradient_fill::operator== | ( | const gradient_fill & | other | ) | const |
Returns true if the gradient is equivalent to other.
double xlnt::gradient_fill::right | ( | ) | const |
Returns the distance from the right where the gradient starts.
gradient_fill& xlnt::gradient_fill::right | ( | double | value | ) |
Sets the distance from the right where the gradient starts.
std::unordered_map<double, color> xlnt::gradient_fill::stops | ( | ) | const |
Returns all of the gradient stops.
double xlnt::gradient_fill::top | ( | ) | const |
Returns the distance from the top where the gradient starts.
gradient_fill& xlnt::gradient_fill::top | ( | double | value | ) |
Sets the distance from the top where the gradient starts.
gradient_fill_type xlnt::gradient_fill::type | ( | ) | const |
Returns the type of this gradient fill
gradient_fill& xlnt::gradient_fill::type | ( | gradient_fill_type | new_type | ) |
Sets the type of this gradient fill