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

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...
 

Detailed Description

Describes the fill style of a particular cell.

Constructor & Destructor Documentation

◆ fill() [1/3]

xlnt::fill::fill ( )

Constructs a fill initialized as a none-type pattern fill with no foreground or background colors.

◆ fill() [2/3]

xlnt::fill::fill ( const pattern_fill pattern)

Constructs a fill initialized as a pattern fill based on the given pattern.

◆ fill() [3/3]

xlnt::fill::fill ( const gradient_fill gradient)

Constructs a fill initialized as a gradient fill based on the given gradient.

Member Function Documentation

◆ gradient_fill()

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.

◆ operator!=()

bool xlnt::fill::operator!= ( const fill other) const

Returns true if left is not exactly equal to right.

◆ operator==()

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

Returns true if left is exactly equal to right.

◆ pattern_fill()

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.

◆ solid()

static fill xlnt::fill::solid ( const color fill_color)
static

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.

◆ type()

fill_type xlnt::fill::type ( ) const

Returns the fill_type of this fill depending on how it was constructed.


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