define some built-in rgb colors, missing fill method

This commit is contained in:
Thomas Fussell 2016-05-16 19:31:44 -04:00
parent b8e7931b10
commit 3a589fe8ef
3 changed files with 46 additions and 1 deletions

View File

@ -29,7 +29,7 @@ public:
return wb;
}
void test_read_standard_workbook()
{
TS_ASSERT_DIFFERS(standard_workbook(), nullptr);

View File

@ -37,6 +37,46 @@ const color color::white()
return color(color::type::rgb, "ffffffff");
}
const color color::red()
{
return color(color::type::rgb, "ffff0000");
}
const color color::darkred()
{
return color(color::type::rgb, "ff8b0000");
}
const color color::blue()
{
return color(color::type::rgb, "ff0000ff");
}
const color color::darkblue()
{
return color(color::type::rgb, "ff00008b");
}
const color color::green()
{
return color(color::type::rgb, "ff00ff00");
}
const color color::darkgreen()
{
return color(color::type::rgb, "ff008b00");
}
const color color::yellow()
{
return color(color::type::rgb, "ffffff00");
}
const color color::darkyellow()
{
return color(color::type::rgb, "ffcccc00");
}
color::color()
{
}

View File

@ -267,4 +267,9 @@ double fill::get_gradient_bottom() const
return gradient_path_bottom_;
}
void fill::set_background_color(const color &c)
{
background_color_ = c;
}
} // namespace xlnt