mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
define some built-in rgb colors, missing fill method
This commit is contained in:
parent
b8e7931b10
commit
3a589fe8ef
|
@ -29,7 +29,7 @@ public:
|
|||
|
||||
return wb;
|
||||
}
|
||||
|
||||
|
||||
void test_read_standard_workbook()
|
||||
{
|
||||
TS_ASSERT_DIFFERS(standard_workbook(), nullptr);
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user