13
0
Commit Graph

98 Commits

Author SHA1 Message Date
8fa81c1436 merge onecanvas and cairocanvas branches, and manually resolve conflicts, including rounding in item_to_window() methods 2014-06-03 16:37:53 -04:00
e0533e9dd7 more profound changes to canvas scrolling, in particular find appropriate ScrollGroup for Canvas::{window,canvas}_to_{canvas,window}() 2014-06-03 16:13:12 -04:00
073df89c4d use window-based coordinates when picking current item so that we get per-item (per-scroll-group,really) computation of position and coverage. 2014-06-03 16:12:00 -04:00
54a56cd3c6 various changes to get independent scrolling to work better in canvas. mostly tweaks relating to how scroll offsets are used during rendering.
Event handling offsets still require work.
2014-06-03 16:12:00 -04:00
f17b84ad10 clean up ArdourCanvas::Arrow implementation to remove unshown polygon/head 2014-06-03 16:11:24 -04:00
bf7b35388b rationalize and centralize computation of positional offset and scroll offset for canvas items 2014-06-03 16:11:24 -04:00
22e7252729 inline ScrollGroup::canvas_position() for no particular reason 2014-06-03 16:10:27 -04:00
c9f890bd7c avoid recursing through the entire canvas when scrolling - only scroll explicitly identified ScrollGroups 2014-06-03 16:10:27 -04:00
6019f06bdf different approach to independent scrolling, involving ArdourCanvas::ScrollGroup
The idea now is that a scroll group item can be added to the canvas which will causes its children to scroll in either or both
directions (horizontal or vertical). There are few complications: the position() of the ScrollGroup is ambiguous depending
on whether you want it with scroll taken into account or not, so Item::canvas_position() was added, which defaults to
the same value as Item::position() but is overridden by ScrollGroup to return the position independent of scrolling. This
method is used when translating between item/canvas/window coordinate systems.

Note that the basic idea is that we MOVE the scroll group when a scroll happens. This mirrors what happens in the GnomeCanvas,
where Nick Mainsbridge came up with a great idea that allowed unification of the time bar and track canvases.
2014-06-03 16:10:27 -04:00
97109672c7 initial redesign of canvas scrolling to facilitate independent x- and y-axis scrolling of specific groups within the canvas.
This commit should cause no change in behaviour, but contains all the code and changes necessary
for the next step
2014-06-03 16:09:06 -04:00
33412421f6 Rearrange some #includes to keep MSVC happy 2014-05-30 12:50:49 +01:00
fed5599baa smooth visual curve drawing 2014-05-30 03:04:02 +02:00
30f204b90e Canvas: new x-fade drawing, two curve widget 2014-05-29 03:09:57 +02:00
034f3dafd7 Revert "cairo sub-surface prototype & example
This reverts commit c57fcde78c.
and also     commit f1f8f89fcb.
2014-05-28 19:13:25 +02:00
c57fcde78c cairo sub-surface prototype - intermediate flattened group renderer. 2014-05-28 17:38:42 +02:00
99c953514b implement Curve in/outside fill 2014-05-27 16:37:01 +02:00
432611113d directly apply waveform clip-level changes 2014-05-27 16:37:01 +02:00
791c668756 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-05-26 17:02:21 +02:00
c2946ee00f don't queue redraws when various canvas item properties are "reset" to the same value, plus supporting functions 2014-03-11 07:36:09 -04:00
12ef19d90a if a Fill object is given a zero-alpha (transparent) color, note that 2014-03-07 12:28:52 -05:00
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
e6c3cece64 remove recently added conflation of mingw64 and msvc with respect to symbol export 2014-03-02 14:59:08 -05:00
19395ac258 when mingw is mingw64, it appears that we need to use __declspec() and not __attribute__((visibility)) for export control 2014-03-01 15:16:39 -05:00
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
007e6bb15b remove unneeded extra methods in ArdourCanvas::Curve 2014-02-27 09:22:36 -05:00
f9a3e7f8bb add DEBUG::CanvasEnterLeave to allow runtime toggling of canvas enter/leave events 2014-02-25 16:07:51 -05:00
e2f18ea658 allow per-line configurability of the threshold used to determine if a PolyLine covers a given coordination 2014-02-20 12:53:08 -05:00
05d7947795 make stateful image canvas item actually compile 2014-02-17 16:05:52 -05:00
eb3c14db25 new canvas item to allow image-based GUI construction 2014-02-17 15:28:18 -05:00
172a4a853d fix up problems with patch change flgs not changing height correctly 2014-02-14 12:06:44 -05:00
e247103a7e fix up major thinko's in ArdourCanvas::Group's handling of deletion (both its own, and child items) 2014-02-12 15:15:27 -05:00
bb05ae05a8 remove unused _wave_color member from waveview canvas item; use outline color for edge dots of waveforms instead of hardcoding black 2014-01-26 16:02:38 -05:00
620e1e6677 add event type string function to canvas (since it does not use gtkmm2ext) 2014-01-16 10:52:34 -05:00
35d3a4a351 remove unused code 2014-01-08 10:31:39 -05:00
edb932b819 basic, prototypical drag handle implementation 2014-01-02 16:48:44 -05:00
8f876bb5ab remove legacy CANVAS_COMPATIBILITY property_foo() stuff (related to gnomecanvas API) from libcanvas 2013-12-31 11:54:05 -05:00
7158eb7565 add configurable clipping level to Canvas::WaveView 2013-12-30 15:46:44 -05:00
4886eb7098 try to rationalize logic for displaying/hiding regionview (time axis view item) name highlights and text 2013-12-29 23:10:54 -05:00
218a4664be add visibility/export control to libcanvas 2013-12-27 16:24:58 -05:00
9b6135b2e1 change enter/exit event delivery to follow X Window model (inferior, ancestor, virtual, nonlinear) 2013-12-12 20:44:04 -05:00
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
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
75b25cd913 add a utility function to Canvas to compute distance from a point to a line segment 2013-12-09 13:35:07 -05:00
6473cc7cb4 drop use of bounding box to determine whether an item covers a point; add Item::covers(Duple const&)
Default implementation for Item still uses bounding box, but specializations for Arc (Circle), Polygon, Line and PolyLine have been added
2013-11-04 11:56:10 -05:00
7ce86cec7d handle enter/leave items when zooming and scrolling occur 2013-10-31 03:10:18 -04:00
7bbd28aa08 notable changes to try to improve most of enter/leave handling for canvas items 2013-10-30 23:36:30 -04:00
ecd29c6d70 add Item::redraw() convenience method 2013-10-24 17:54:54 -04:00
097b781209 fix computation of canvas text item bounding box 2013-10-24 17:12:28 -04:00
3ba0ef7192 fix a typo in canvas-debug.h 2013-09-25 10:36:21 -04:00
af3056769c changes to waveform clipping display
* clip level is now -0.9dbFS
   * display of clipping is optional (see Theme Manager window)
   * clipping is based on disk data, unscaled by region gain
2013-06-28 20:21:30 -04:00