13
0

if a Fill object is given a zero-alpha (transparent) color, note that

This commit is contained in:
Paul Davis 2014-03-07 12:28:52 -05:00
parent 1beed21c8a
commit 12ef19d90a
2 changed files with 11 additions and 0 deletions

View File

@ -54,6 +54,7 @@ protected:
Color _fill_color;
bool _fill;
bool _transparent;
StopList _stops;
bool _vertical_gradient;
};

View File

@ -32,6 +32,7 @@ Fill::Fill (Group* parent)
: Item (parent)
, _fill_color (0x000000ff)
, _fill (true)
, _transparent (false)
{
}
@ -42,6 +43,15 @@ Fill::set_fill_color (Color color)
if (_fill_color != color) {
begin_visual_change ();
_fill_color = color;
double r, g, b, a;
color_to_rgba (color, r, g, b, a);
if (a == 0.0) {
_transparent = true;
} else {
_transparent = false;
}
end_visual_change ();
}
}