if a Fill object is given a zero-alpha (transparent) color, note that
This commit is contained in:
parent
1beed21c8a
commit
12ef19d90a
@ -54,6 +54,7 @@ protected:
|
|||||||
|
|
||||||
Color _fill_color;
|
Color _fill_color;
|
||||||
bool _fill;
|
bool _fill;
|
||||||
|
bool _transparent;
|
||||||
StopList _stops;
|
StopList _stops;
|
||||||
bool _vertical_gradient;
|
bool _vertical_gradient;
|
||||||
};
|
};
|
||||||
|
@ -32,6 +32,7 @@ Fill::Fill (Group* parent)
|
|||||||
: Item (parent)
|
: Item (parent)
|
||||||
, _fill_color (0x000000ff)
|
, _fill_color (0x000000ff)
|
||||||
, _fill (true)
|
, _fill (true)
|
||||||
|
, _transparent (false)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -42,6 +43,15 @@ Fill::set_fill_color (Color color)
|
|||||||
if (_fill_color != color) {
|
if (_fill_color != color) {
|
||||||
begin_visual_change ();
|
begin_visual_change ();
|
||||||
_fill_color = color;
|
_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 ();
|
end_visual_change ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user