Commit graph

524 commits

Author SHA1 Message Date
Paul Davis
f17b84ad10 clean up ArdourCanvas::Arrow implementation to remove unshown polygon/head 2014-06-03 16:11:24 -04:00
Paul Davis
bf7b35388b rationalize and centralize computation of positional offset and scroll offset for canvas items 2014-06-03 16:11:24 -04:00
Paul Davis
22e7252729 inline ScrollGroup::canvas_position() for no particular reason 2014-06-03 16:10:27 -04:00
Paul Davis
c9f890bd7c avoid recursing through the entire canvas when scrolling - only scroll explicitly identified ScrollGroups 2014-06-03 16:10:27 -04:00
Paul Davis
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
Paul Davis
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
Robin Gareus
ab60429efc test possible 'flickering' with nvidia 2014-05-31 18:22:34 +02:00
Robin Gareus
2342b7d611 don't allow waveform to bleed into TimeAxisViewItem frame border 2014-05-31 14:06:10 +02:00
John Emmas
161a3258ee Add newly introduced sources to MSVC project
(xfade_curve stuff)
2014-05-30 12:52:03 +01:00
John Emmas
33412421f6 Rearrange some #includes to keep MSVC happy 2014-05-30 12:50:49 +01:00
Robin Gareus
fed5599baa smooth visual curve drawing 2014-05-30 03:04:02 +02:00
Robin Gareus
202d926916 smoothen rendering of x-fades 2014-05-29 07:48:43 +02:00
Robin Gareus
604abffeb5 fix prev commit 2014-05-29 05:30:13 +02:00
Robin Gareus
86e7d86089 renice x-fade rendering w/cairo-antialiasing 2014-05-29 05:06:02 +02:00
Robin Gareus
30f204b90e Canvas: new x-fade drawing, two curve widget 2014-05-29 03:09:57 +02:00
Robin Gareus
034f3dafd7 Revert "cairo sub-surface prototype & example
This reverts commit c57fcde78c.
and also     commit f1f8f89fcb.
2014-05-28 19:13:25 +02:00
Robin Gareus
f1f8f89fcb exercise subsurface rendering for x-fade curves 2014-05-28 17:38:42 +02:00
Robin Gareus
c57fcde78c cairo sub-surface prototype - intermediate flattened group renderer. 2014-05-28 17:38:42 +02:00
Robin Gareus
c03b658531 Curve: anti-aliasing.
use cairo for anti-aliasing, and ignore explicit Catmull-Rom
points for that fall on the same x-cordinate.
2014-05-27 19:36:10 +02:00
Robin Gareus
99c953514b implement Curve in/outside fill 2014-05-27 16:37:01 +02:00
Robin Gareus
432611113d directly apply waveform clip-level changes 2014-05-27 16:37:01 +02:00
Robin Gareus
bf4819ab0e "We brake for nobody." oh wait. - fixes Rectified Waveform view. 2014-05-26 22:45:42 +02:00
Robin Gareus
bdb342123f fix prev commit, window-offset for x-fade drawing 2014-05-26 18:22:21 +02:00
Robin Gareus
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
Paul Davis
e99c8960c0 first pass at tightening up waveform drawing algorithm to generally round down when dealing with fractional pixels 2014-05-07 10:35:50 -04:00
Paul Davis
1b989a93c2 remove redundant os.path.join() calls when specifying install path as bld.env['LIBDIR'] 2014-04-28 21:18:02 -04:00
Paul Davis
058986f77b finish unfinished work at basing all install paths on the program name 2014-04-28 21:11:08 -04:00
John Emmas
077a194430 Add the main VC project files for building Ardour3 with Microsoft Visual Studio
Note that there's no 'VS Solution' file at present and some targets haven't been built yet (e.g. 'fst')
2014-04-08 09:49:35 +01: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
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
Paul Davis
032f394b2a tiny red dots, be gone (expand poly_item bounding box by correct (?) amount) 2014-03-10 11:10:38 -04:00
Paul Davis
ec0be1310f missing iterator advance 2014-03-10 11:10:38 -04:00
Paul Davis
52c8b6d66a stupid hack to fix rectangle damage noise 2014-03-09 11:39:57 -04:00
Paul Davis
6d3bd4e53c use fill transparency detection to avoid rendering transparent (invisible) rectangle fill area 2014-03-07 12:29:26 -05:00
Paul Davis
12ef19d90a if a Fill object is given a zero-alpha (transparent) color, note that 2014-03-07 12:28:52 -05:00
Paul Davis
52cfbb45e1 alter ArdourCanvas::Rect::expand() to not clamp to all-positive values because we now definitely have items that have negative coordinates.
This could have drastic consequences but I think the all-positive was a hack to fix a problem that was solved separately by means currently unknown.
2014-03-07 11:26:27 -05:00
Paul Davis
621887cfaa slightly optimize bounding box computation for ArdourCanvas::PolyItem by avoiding inner conditional 2014-03-07 11:24:51 -05:00
Paul Davis
e5802bdbea move an assert to cover only cases where it is needed 2014-03-07 11:23:22 -05:00
Paul Davis
2a6fc5af74 tweak Polygon::render() to work whether or not fill or outline are unset 2014-03-06 23:15:59 -05:00
Paul Davis
a08c0ea1da manually revert change to canvas expose handling in fee026c5ef
Breaking out the rectangles implies a z-axis ordering of drawing,because the rect drawn last will implicitly be "on top".
But redraw areas are not submitted with any z-axis information, and so drawing like this breaks canvas layering. It
would be more efficient to draw the rects separately, but we don't have any ordering information and so we cannot do it
correctly.
2014-03-05 13:12:18 -05: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
dde4d3bbc3 only queue an item redraw from Item::show() or Item::Hide() if the call changes the visibility status of the item (i.e. make no-ops really be no-ops) 2014-03-04 21:58:17 -05:00
Paul Davis
fee026c5ef break down GdkEventExpose into distinct rectangles for canvas expose rather than drawing the entire region as a single rect 2014-03-04 21:58:16 -05:00
Robin Gareus
912f07b919 mingw build fixes (tested with i686-w64-mingw32 on linux-x86_64) 2014-03-04 15:25:58 +01:00
Paul Davis
e6c3cece64 remove recently added conflation of mingw64 and msvc with respect to symbol export 2014-03-02 14:59:08 -05:00
Paul Davis
560c667ea9 fix compilation of libcanvas so that when built as a shared lib (the default), -DLIBCANVAS_DLL_EXPORTS=1 is not lost 2014-03-01 16:52:08 -05:00
Paul Davis
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
Paul Davis
e60933650e remove debug messages, for now 2014-02-28 17:17:00 -05:00