mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
if a Fill object is given a zero-alpha (transparent) color, note that
This commit is contained in:
parent
1beed21c8a
commit
12ef19d90a
2 changed files with 11 additions and 0 deletions
|
|
@ -54,6 +54,7 @@ protected:
|
|||
|
||||
Color _fill_color;
|
||||
bool _fill;
|
||||
bool _transparent;
|
||||
StopList _stops;
|
||||
bool _vertical_gradient;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 ();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue