Paul Davis
a7a75f105a
remove hard-coded colors
2014-08-17 15:08:19 -04:00
Paul Davis
473bcc3fa6
many fixes and improvements for a now-working ArdourCanvas::Ruler item
2014-08-17 15:06:11 -04:00
Paul Davis
126a293ab9
add ruler.cc to canvas wscript
2014-08-17 15:06:06 -04:00
Paul Davis
def1f12164
add Ruler to Canvas fwd.h
2014-08-17 15:05:59 -04:00
Paul Davis
76b9ad2294
add initial (untested) implementation of canvas ruler item
2014-08-17 15:05:48 -04:00
Paul Davis
592146822a
fix Canvas::LineSet implementation to support horizontal and vertical linesets
2014-08-17 15:00:23 -04:00
Paul Davis
6f38ff5c3c
remove global canvas scroll offset, to provide no-scroll-parent == no-scroll behaviour
2014-08-17 14:58:10 -04:00
Paul Davis
f07af61132
fix borked logic controlling whether/when to draw clip/outline pixels/lines in waveviews
2014-08-17 14:56:44 -04:00
nick_m
017a4a8a87
Use global clip level from prefs. Restore clip colour, \
2014-08-17 14:56:27 -04:00
Paul Davis
f188ecb954
when delivering enter/leave events to canvas items, ensure that the event coordinates are in canvas space, not window space
...
This fixes a variety of borkage in the canvas at present
2014-08-17 14:56:14 -04:00
Paul Davis
fc9447f2b5
add Item::canvas_origin() for convenience
2014-08-17 14:56:09 -04:00
nick_m
aebd5863f0
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-08-17 14:55:20 -04:00
Paul Davis
07cfa9e163
When rendering a Canvas::Rectangle take its _position into account, even though in general this is always (0,0) within its parent
2014-08-17 14:50:37 -04:00
Paul Davis
874ac355e7
clip rendering of ScrollGroup to just the part of the canvas covered by the scroll group.
...
This stops tracks from appearing to scroll up under the rulers, among other things.
2014-08-17 14:50:12 -04:00
Paul Davis
bbf037c4a3
fix problems with expose/redraws from canvas where requested area goes way outside the integer range allowed by GTK/GDK
2014-08-17 14:49:34 -04:00
Paul Davis
df24b1ab8d
remove debugging output
2014-08-17 14:44:31 -04:00
Paul Davis
c926ca2b6b
basic, initial structure for canvas widget item
2014-08-17 14:44:25 -04:00
John Emmas
83d0b6cd7a
Add newly introduced sources to MSVC project
...
(scroll_group stuff)
2014-08-17 13:46:21 -04:00
Paul Davis
fdbb93ea3c
merge onecanvas and cairocanvas branches, and manually resolve conflicts, including rounding in item_to_window() methods
2014-08-17 13:44:57 -04:00
Paul Davis
e8e3460665
more profound changes to canvas scrolling, in particular find appropriate ScrollGroup for Canvas::{window,canvas}_to_{canvas,window}()
...
Conflicts:
gtk2_ardour/editor_mouse.cc
2014-08-17 13:43:52 -04:00
Paul Davis
0bfbb030fa
fix missing leftover Canvas::pick_current_item() which was confusing button release event coordinates
2014-08-17 13:39:19 -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
Paul Davis
bed0c78432
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-08-17 13:39:10 -04:00
Paul Davis
7bbd63dc39
clean up ArdourCanvas::Arrow implementation to remove unshown polygon/head
2014-08-17 13:39:02 -04:00
Paul Davis
d408fffe4e
rationalize and centralize computation of positional offset and scroll offset for canvas items
2014-08-17 13:38:45 -04:00
Paul Davis
2b361eecec
inline ScrollGroup::canvas_position() for no particular reason
2014-08-17 13:38:35 -04:00
Paul Davis
11e789df5b
avoid recursing through the entire canvas when scrolling - only scroll explicitly identified ScrollGroups
2014-08-17 13:37:45 -04:00
Paul Davis
cb9453b475
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-08-17 13:37:27 -04:00
Paul Davis
87fa554ac9
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-08-17 13:37:16 -04:00
Paul Davis
6d3b9fe7e6
overwrite state of libs/canvas with code from corresponding period in ardour-cairocanvas
...
This makes continued merges with ardour codebase easier, at the
small cost of removing the XML-based constructors. They were not
in use anyway and their use doesn't really fit into the
conception of the canvas as a dynamic UI element. Could reintroduce
them at a later date.
2014-08-17 13:29:01 -04:00
Robin Gareus
bafc5b816c
test possible 'flickering' with nvidia
2014-08-16 17:59:45 -04:00
Robin Gareus
31c49330f0
don't allow waveform to bleed into TimeAxisViewItem frame border
2014-08-16 17:59:10 -04:00
John Emmas
8dd1ed2b7a
Add newly introduced sources to MSVC project
...
(xfade_curve stuff)
Conflicts:
libs/canvas/MSVCcanvas/cairocanvas.vcproj
2014-08-16 17:58:17 -04:00
John Emmas
c7dc741bed
Rearrange some #includes to keep MSVC happy
2014-08-16 17:58:01 -04:00
Robin Gareus
81068a7932
smooth visual curve drawing
2014-08-16 17:57:42 -04:00
Robin Gareus
08666b2cfd
smoothen rendering of x-fades
2014-08-16 17:56:05 -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
da7cdb9b26
cairo sub-surface prototype - intermediate flattened group renderer.
2014-08-16 17:20:51 -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
264947595a
directly apply waveform clip-level changes
2014-08-16 17:19:17 -04:00
Robin Gareus
b53cb263e5
"We brake for nobody." oh wait. - fixes Rectified Waveform view.
2014-08-16 17:16:41 -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
Paul Davis
7e31e1399f
first pass at tightening up waveform drawing algorithm to generally round down when dealing with fractional pixels
2014-08-16 16:35:21 -04:00
Paul Davis
1c84289254
remove redundant os.path.join() calls when specifying install path as bld.env['LIBDIR']
2014-08-16 16:10:30 -04:00