13
0
Commit Graph

73 Commits

Author SHA1 Message Date
47110c983c fix OSX/PPC 10.4 long maths 2015-03-31 16:05:15 +02:00
2e27b55179 For the canvas library, #include 'gtkmm2ext/gui_thread.h' rather than 'gtk2_ardour/gui_thread.h'
Technically it doesn't make much difference but from what I can tell, the only files which #include 'gtk2_ardour/gui_thread.h' are the source files from gtk2_ardour itself. The support libraries always #include 'gtkmm2ext/gui_thread.h' directly (which seems sensible). So for consistency's sake, let's keep it the same for libcanvas.
2015-03-29 09:53:02 +01:00
nick_m
8962bfba61 Better fix for 6183.
Invalidate all source entries from the image cache when we get our
region's DropReferences signal, while ignoring any subsequent regions with
no source.
2015-03-29 02:13:40 +11:00
nick_m
eff25b06f5 Fix 0006183 (waveview crash).
Should fix crash when audiosource disappears.
Reworked from submitted patch from tlat.
2015-03-24 23:35:43 +11:00
nick_m
bc20da35f7 Revert mistaken change in e7b0e67bc8 2015-03-22 05:35:13 +11:00
nick_m
69a6c4d747 Provide an image if there are no peaks. 2015-03-22 00:31:32 +11:00
nick_m
e7b0e67bc8 Manual merge of the drawing component of waveview branch.
In summary:

    * no antialiasing of waveviews
    * no diagonal lines
    * simplify clip detection
    * don't use LINE_CAP_ROUND for outline
    * use the wave colour when drawing outline only
2015-03-10 23:35:53 +11:00
nick_m
5d5f83c56b The commit 3da9c3b740
wasn't the no-op it claimed to be.
2015-02-20 23:30:48 +11:00
0f0aebf26b remove naive attempt to avoid drawing first vertical pixel line of Canvas::WaveView
And add commented out attempt at more subtle attempt to get it right
2015-02-11 21:59:38 -05:00
34779ee81e add a sort-of hack to allow us to avoid drawing the first pixel of a waveview when necessary 2015-02-10 19:48:47 -05:00
f282884094 apply Theme > “Show waveform clipping”
fixes http://tracker.ardour.org/view.php?id=5589#c15515
2015-01-21 19:35:04 +01:00
318a9edab9 massive reworking of color selection implementation 2014-11-26 18:22:22 +02:00
ea5876b836 Remove dead code. 2014-11-25 02:11:44 -05:00
4260d0ca0e use new canvas colors header as necessary 2014-11-07 14:24:27 -05:00
f1e6b28ab7 use ArdourCanvas::TimeRectangle for regions, notes, markers 2014-11-03 21:48:08 -05:00
3da9c3b740 NOOP, remove trailing whitespace 2014-09-13 01:48:10 +02:00
aa83f1a8c7 waveform drawing details:
* proper y-pixel alignment (+.5px offset)
* outline: draw dots (not 1px lines)
* shape: round towards peak (use signal, not top/bot)
* honor 2px red selection border
* work-around canvas rect +1 issue
* always draw clipping line towards center
* draw at most one clip-line at either side of 0.
* exact 1px wide zero line
* fix spread calculation for rectified view
2014-09-13 01:48:10 +02:00
878797d13e waveform: really draw 1px lines. 2014-09-12 16:43:20 +02:00
98249a2563 update waveform drawing for zoomed-in, non-overlapping min/max peaks 2014-09-12 16:42:55 +02:00
nick_m
d3408844be Render waveview components onto alpha masks to simplify drawing.
Reduce user panic by removing ! from missing file dialog title.
Use justify left in missing file dialog.
2014-07-15 21:59:22 +10:00
53a5f5d8ca actually do something in WaveView::region_resized() which is called whenever the region is resized; implement WaveView::set_region_start() which could be used by an xfade editor etc. 2014-07-03 10:00:12 -04:00
199ac89d40 return of the zero line 2014-06-23 15:24:08 -04:00
a743e68a0c revert drawing of rectified waves back to previous approach since it (might be) slightly more efficient and is simpler to understand; add comments 2014-06-23 15:12:30 -04:00
437099fff9 completely rethink waveform rendering (again)
There are 3 possible components to draw at each x-axis position: the waveform "line", the zero line and an outline/clip indicator.
We have to decide which of the 3 to draw at each position, pixel by pixel. This makes the rendering less efficient but it is
the only way I can see to do this correctly.
2014-06-23 14:57:55 -04:00
71c417948e fix logic error that meant one side of the waveform outline is not drawn; draw zero line before outline, for better effects with low amplitude waves 2014-06-23 10:06:59 -04:00
a8bd6ecc4f refactor Canvas so that all Items have children; add Container abstract base class; rename Group as "Layout" and retain only drawing semantics 2014-06-21 11:43:42 -04:00
nick_m
b31608f64e Cache entries are now region colour aware. 2014-06-18 00:16:51 +10:00
590882f3c8 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-06-12 14:53:44 -04:00
b86e1204ec fix borked logic controlling whether/when to draw clip/outline pixels/lines in waveviews 2014-06-08 13:13:44 -04:00
nick_m
e495577f98 Use global clip level from prefs. Restore clip colour, \ 2014-06-09 02:50:14 +10:00
nick_m
7a05dde39d Use a dumb cache for waveview ImageSurfaces. This halves the size of the
previous one, but usually ends up using three of them at the current
CACHE_HIGH_WATER setting.
Should result in a smaller memory footprint for sessions with
multiple copies of nearby audio segments (electronic style).
The downside is the larger memory footprint for linear recording
sessions if CACHE_HIGH_WATER > 1 (1 giving a max of two
half - sized cache entries per audio stream).
2014-06-08 01:47:38 +10: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
2342b7d611 don't allow waveform to bleed into TimeAxisViewItem frame border 2014-05-31 14:06:10 +02:00
432611113d directly apply waveform clip-level changes 2014-05-27 16:37:01 +02:00
bf4819ab0e "We brake for nobody." oh wait. - fixes Rectified Waveform view. 2014-05-26 22:45:42 +02:00
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
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
02e6d14e23 make no-zero-line be the default for wave views (still shown for normal audio region views 2014-01-10 12:08:58 -05:00
8fa54cd1d9 shrink waveview zero line to single pixel 2014-01-07 22:51:18 -05:00
110c790d91 define signal associated with configurable clipping level to Canvas::WaveView 2013-12-30 15:54:09 -05:00
7158eb7565 add configurable clipping level to Canvas::WaveView 2013-12-30 15:46:44 -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
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
aa480b8338 make clip indicators more visible (the smaller of 7 pixels or 5% of track height) 2013-06-28 17:09:39 -04:00
5b3ebe824e restore display of clipping in waveform displays 2013-06-28 13:40:51 -04:00
c6fe6b0996 cleanup ArdourCanvas::WaveView
Mostly this just involved removing the private CacheEntry class that really served no further purpose once
the design reverted to a single cached image
2013-06-27 17:23:34 -04:00
a1f858d3b2 an awful lot of tweaks to drawing details 2013-06-24 16:28:53 -04:00
11becd4a6b properly restore newer (cairo-canvas related) UI config parameters 2013-06-21 17:15:56 -04:00
1c74a3ab2d waveform drawing improvements
* handle logscaled and rectified
    * put dark tips in right places
    * improve color selection algorithm
2013-06-21 13:17:37 -04:00
68779e0c0a (working) start of an experiment with pyramix-style waveform drawing 2013-06-20 23:12:19 -04:00