Commit graph

27 commits

Author SHA1 Message Date
Paul Davis
98aa604aa0 refactor Canvas so that all Items have children; add Container abstract base class; rename Group as "Layout" and retain only drawing semantics 2014-08-17 17:42:59 -04:00
Paul Davis
452cf1db35 change Canvas heirarchy and constructors
Items no longer need a parent group (they require a Canvas pointer instead), so all constructors have been rationalized
and have two variants, one with a parent and one with a canvas.

All Items now inherit from Fill and Outline, to banish diagonal inheritance and virtual base classes and all that.

There were zero changes to the Ardour GUI arising from these changes.
2014-08-17 15:08:56 -04:00
Paul Davis
f60e579653 use window-based coordinates when picking current item so that we get per-item (per-scroll-group,really) computation of position and coverage. 2014-08-17 13:39:15 -04:00
Robin Gareus
81068a7932 smooth visual curve drawing 2014-08-16 17:57:42 -04:00
Robin Gareus
f91194f60f fix prev commit 2014-08-16 17:55:54 -04:00
Robin Gareus
93fea9021e renice x-fade rendering w/cairo-antialiasing 2014-08-16 17:55:47 -04:00
Robin Gareus
ec99a4f5c2 Canvas: new x-fade drawing, two curve widget
Conflicts:
	libs/canvas/wscript
2014-08-16 17:23:25 -04:00
Robin Gareus
9ec7b79ac9 Revert "cairo sub-surface prototype & example
This reverts commit c57fcde78c.
and also     commit f1f8f89fcb.
2014-08-16 17:21:08 -04:00
Robin Gareus
17e94e02e8 exercise subsurface rendering for x-fade curves 2014-08-16 17:20:57 -04:00
Robin Gareus
87974bf89c Curve: anti-aliasing.
use cairo for anti-aliasing, and ignore explicit Catmull-Rom
points for that fall on the same x-cordinate.
2014-08-16 17:20:27 -04:00
Robin Gareus
3d9b03017c implement Curve in/outside fill 2014-08-16 17:20:09 -04:00
Robin Gareus
eaa4b4bdd7 fix prev commit, window-offset for x-fade drawing 2014-08-16 17:16:23 -04:00
Robin Gareus
4242022ee9 fix x-fade drawing
Catmull-Rom curve samples are not equally spaced on the x-axis.
Furthermore, Curve::map_value() is not needed, cairo line_to
already interpolates.
2014-08-16 17:16:18 -04:00
Valeriy Kamyshniy
33f06cc498 [P4/git history rebuild] odd commit probably caused by a missing Ardour commit. Probably needs reverting in a future global merge 2014-05-27 22:54:22 -04:00
Paul Davis
9df3157dfc big rework of scrolling, horizontal part considered almost 100% done.
Many more changes than I would typically like in a single commit, but this was all very intertwined.
Vertical scrolling using track-stepping still to follow.
2014-03-20 13:29:45 -04:00
Paul Davis
58a30da03d use a centripetal catmull-rom curve to smooth ArdourCanvas::Curve
See http://en.wikipedia.org/wiki/Centripetal_Catmull-Rom to understand the benefits of this.
2014-03-05 11:38:30 -05:00
Paul Davis
e6849e9c7e "correct" curve drawing (no artifacts during redraw)
Interpolation errors still need addressing.
2014-03-04 21:58:17 -05:00
Paul Davis
c29d392b0c tentative intermediate state for ArdourCanvas::Curve 2014-03-04 21:58:17 -05:00
Paul Davis
e60933650e remove debug messages, for now 2014-02-28 17:17:00 -05:00
Paul Davis
435c3ad47f change implementation of ArdourCanvas::Curve to use GIMP-inspired ideas.
Presmooth with quadratic bezier, then interpolate when rendering. Not finished yet
2014-02-28 17:00:25 -05:00
Paul Davis
007e6bb15b remove unneeded extra methods in ArdourCanvas::Curve 2014-02-27 09:22:36 -05:00
Paul Davis
88732abd01 change event propagation to be based on parent/child lineage, not z-axis stacking, plus some more alterations to try to get enter/leave working 2013-12-12 10:03:33 -05:00
Paul Davis
a631350f93 implement Curve::covers() in a very primitive way (also note: fails for actual spline curves) 2013-12-09 21:03:16 -05:00
Paul Davis
c4f0063a68 make PolyLine use distance_to_segment_squared(), and add separate (null, for now) method Curve::covers(Duple) because the math there needs to be different, maybe 2013-12-09 17:24:34 -05:00
Paul Davis
64d3763652 remove all xml++.h inclusion by canvas implementations 2013-04-15 22:00:13 -04:00
Paul Davis
84fb0a8dce remove all XML related API from canvas. it may have been useful during development, but it is just a distraction - we will NEVER be saving or restoring canvas state via XML or any kind of serialized state 2013-04-15 21:57:08 -04:00
Paul Davis
7caf517b27 add (bezier) curves to canvas, use for automation lines; fix issue with rectangles missing their upper line segment; more cairo canvas fixes 2013-04-11 22:54:12 -04:00