mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +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
|
||||
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;
|
||||
}
|
||||
|
||||
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));
|
||||
setup_fill_context (context);
|
||||
context->fill_preserve ();
|
||||
setup_outline_context (context);
|
||||
context->stroke ();
|
||||
|
||||
if (fill()) {
|
||||
setup_fill_context (context);
|
||||
context->fill_preserve ();
|
||||
}
|
||||
|
||||
if (outline()) {
|
||||
setup_outline_context (context);
|
||||
context->stroke ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue