projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
slightly optimize bounding box computation for ArdourCanvas::PolyItem by avoiding...
[ardour.git]
/
libs
/
canvas
/
polygon.cc
diff --git
a/libs/canvas/polygon.cc
b/libs/canvas/polygon.cc
index 2e818236160d77335aec155aae1245d3de4a2a6c..9352e900e9ab91ea36b017e67c4e81d5f5653913 100644
(file)
--- a/
libs/canvas/polygon.cc
+++ b/
libs/canvas/polygon.cc
@@
-41,8
+41,7
@@
Polygon::~Polygon ()
void
Polygon::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
{
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 ()) {
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->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) {
}
if (_fill) {