mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +01:00
Canvas::Arc obey fill/outline conditionals
This commit is contained in:
parent
79b12f82eb
commit
cedd4f3d4e
1 changed files with 11 additions and 5 deletions
|
|
@ -70,17 +70,23 @@ Arc::compute_bounding_box () const
|
||||||
void
|
void
|
||||||
Arc::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) const
|
Arc::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) const
|
||||||
{
|
{
|
||||||
if (_radius <= 0.0 || _arc_degrees <= 0.0) {
|
if (_radius <= 0.0 || _arc_degrees <= 0.0 || (!fill() && !outline())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Duple c = item_to_window (Duple (_center.x, _center.y));
|
Duple c = item_to_window (Duple (_center.x, _center.y));
|
||||||
|
|
||||||
context->arc (c.x, c.y, _radius, _start_degrees * (M_PI/180.0), _arc_degrees * (M_PI/180.0));
|
context->arc (c.x, c.y, _radius, _start_degrees * (M_PI/180.0), _arc_degrees * (M_PI/180.0));
|
||||||
setup_fill_context (context);
|
|
||||||
context->fill_preserve ();
|
if (fill()) {
|
||||||
setup_outline_context (context);
|
setup_fill_context (context);
|
||||||
context->stroke ();
|
context->fill_preserve ();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (outline()) {
|
||||||
|
setup_outline_context (context);
|
||||||
|
context->stroke ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue