xlnt
|
Describes the fill style of a particular cell. More...
#include <fill.hpp>
Public Member Functions | |
fill () | |
Constructs a fill initialized as a none-type pattern fill with no foreground or background colors. More... | |
fill (const pattern_fill &pattern) | |
Constructs a fill initialized as a pattern fill based on the given pattern. More... | |
fill (const gradient_fill &gradient) | |
Constructs a fill initialized as a gradient fill based on the given gradient. More... | |
fill_type | type () const |
Returns the fill_type of this fill depending on how it was constructed. More... | |
class gradient_fill | gradient_fill () const |
Returns the gradient fill represented by this fill. Throws an invalid_attribute exception if this is not a gradient fill. More... | |
class pattern_fill | pattern_fill () const |
Returns the pattern fill represented by this fill. Throws an invalid_attribute exception if this is not a pattern fill. More... | |
bool | operator== (const fill &other) const |
Returns true if left is exactly equal to right. More... | |
bool | operator!= (const fill &other) const |
Returns true if left is not exactly equal to right. More... | |
Static Public Member Functions | |
static fill | solid (const color &fill_color) |
Helper method for the most common use case, setting the fill color of a cell to a single solid color. The foreground and background colors of a fill are not the same as the foreground and background colors of a cell. When setting a fill color in Excel, a new fill is created with the given color as the fill's fgColor and index color number 64 as the bgColor. This method creates a fill in the same way. More... | |
Describes the fill style of a particular cell.
xlnt::fill::fill | ( | ) |
Constructs a fill initialized as a none-type pattern fill with no foreground or background colors.
xlnt::fill::fill | ( | const pattern_fill & | pattern | ) |
Constructs a fill initialized as a pattern fill based on the given pattern.
xlnt::fill::fill | ( | const gradient_fill & | gradient | ) |
Constructs a fill initialized as a gradient fill based on the given gradient.
class gradient_fill xlnt::fill::gradient_fill | ( | ) | const |
Returns the gradient fill represented by this fill. Throws an invalid_attribute exception if this is not a gradient fill.
bool xlnt::fill::operator!= | ( | const fill & | other | ) | const |
Returns true if left is not exactly equal to right.
bool xlnt::fill::operator== | ( | const fill & | other | ) | const |
Returns true if left is exactly equal to right.
class pattern_fill xlnt::fill::pattern_fill | ( | ) | const |
Returns the pattern fill represented by this fill. Throws an invalid_attribute exception if this is not a pattern fill.
Helper method for the most common use case, setting the fill color of a cell to a single solid color. The foreground and background colors of a fill are not the same as the foreground and background colors of a cell. When setting a fill color in Excel, a new fill is created with the given color as the fill's fgColor and index color number 64 as the bgColor. This method creates a fill in the same way.
fill_type xlnt::fill::type | ( | ) | const |
Returns the fill_type of this fill depending on how it was constructed.