mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 06:05:43 +01:00
tweak Polygon::render() to work whether or not fill or outline are unset
This commit is contained in:
parent
feebabb330
commit
2a6fc5af74
1 changed files with 10 additions and 3 deletions
|
|
@ -41,8 +41,7 @@ Polygon::~Polygon ()
|
|||
void
|
||||
Polygon::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||
{
|
||||
if (_outline) {
|
||||
setup_outline_context (context);
|
||||
if (_outline || _fill) {
|
||||
render_path (area, context);
|
||||
|
||||
if (!_points.empty ()) {
|
||||
|
|
@ -51,7 +50,15 @@ Polygon::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
|||
context->move_to (p.x, p.y);
|
||||
}
|
||||
|
||||
context->stroke_preserve ();
|
||||
}
|
||||
|
||||
if (_outline) {
|
||||
setup_outline_context (context);
|
||||
if (_fill) {
|
||||
context->stroke_preserve ();
|
||||
} else {
|
||||
context->stroke ();
|
||||
}
|
||||
}
|
||||
|
||||
if (_fill) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue