13
0
Commit Graph

575 Commits

Author SHA1 Message Date
fc70b5a9f9 Compute arrow bbox manually to appease crazy canvas. 2015-01-16 22:04:26 -05:00
8f823388d9 Kludgey fix for invisible playhead when scrolled.
The problem this is avoiding makes absolutely no sense.  Either I'm dumb, or
something is more deeply wrong with scroll group bounding boxes, or both, but I
don't care anymore.  This works.  Viva release mode.
2015-01-16 21:04:38 -05:00
b759fd5879 Put playhead on top of everything.
Achieve this by adding a new hscroll group just for cursors.

That requires a slightly smarter window_to_canvas() to deal with overlapping
sensitive scroll groups.  New rule is that scroll groups can overlap, but the
most sensitive one found from the top down will be chosen to translate
coordinates.  This basically means don't overlap scroll groups with different
sensitivities.

In the presence of scroll groups, having a canvas-wide window_to_canvas()
and/or canvas_to_window() fundamentally makes no sense.  At some point in the
glorious future we should kill those and use only item-relative coordinate
translation.
2015-01-16 19:13:56 -05:00
d194ec9135 Update arrow bbox when geometry changes. 2015-01-16 19:13:56 -05:00
e48ff6b6a0 Fix clipping for scroll groups an offset bbox. 2015-01-16 19:13:56 -05:00
55278fb3b0 Fix mouse event position offset bug.
Search scroll groups for event delivery from top to bottom rather than bottom
to top.  Overlapping scroll groups still aren't properly supported by the
canvas, but currently all we care about is that the top one gets the event, so
the hscroll group (tempo lines) can be below the hvscroll group (tracks), but
the latter gets events.
2015-01-12 01:05:01 -05:00
0367aa5825 remove cruft (old unused pre-git version files) 2015-01-09 06:11:57 +01:00
ec17b5388f Fix bounding box of rectangles with wide outlines. 2015-01-08 18:36:10 -05:00
7985624037 Close polygon borders (fix partially drawn hits). 2015-01-08 11:09:38 -05:00
2558e52e22 Fix alleged use of uninitialized variable.
Looks like a guaranteed else branch to me, but who am I to argue with gcc?
2014-12-31 17:32:21 -05:00
86242348ec Fix crash when getting width of item with no bbox. 2014-12-24 16:02:56 -05:00
a494211e73 add ArdourCanvas::change_alpha()
Time to move away from rgba macros
2014-12-19 09:53:26 -05:00
74be550698 change Item::visible() to Item::self_visible(); add Item::visible() which returns accurate visibility
Child items will be hidden when their ancestors are hidden. The old ::visible() implementation didn't reflect this. In addition,
when changes are made to hidden items (new definition of visible/not visible), don't bother to request redraws, since this will
be done when the item becomes visible again.
2014-12-18 10:30:38 -05:00
9831006c8e add getters for SVAModifier 2014-12-15 12:06:53 -05:00
995bcd3aa0 fix typo 2014-12-15 09:29:04 -05:00
aa57e9e032 more fixes to SVAModifier constructor(s) 2014-12-15 09:03:52 -05:00
3fa4063d9b fix up SVAModifier constructors 2014-12-14 23:41:31 -05:00
427b93055f add SVAModifier to ArdourCanvas color code 2014-12-14 23:34:36 -05:00
624a86c39d lots more color work, closer and closer to being ready for ... being taken apart again 2014-12-08 22:02:38 -05:00
9ac7ddb31d remove all explicit button text colors; use contrasting_text_color() instead.
Also, use a slightly off-white rather than pure white, which should really be configurable
2014-12-07 13:55:40 -05:00
60f4f5b9d8 Fix inappropriately massive flag font. 2014-12-06 16:07:32 -05:00
9266e7524a experimental drawing optimization.
Q: is bounding_box(); etc more complex than queuing draw?

either way, canvas should eventually switch to
use an optimized OptimizingLookupTable.
2014-12-05 22:40:26 +01:00
207fd04587 include alpha-delta computation in HSV::delta() 2014-12-05 09:01:55 -05:00
db3d42d551 first pass at optimization for low-level canvas code 2014-12-02 05:32:34 -05:00
f190e630ab Show discrete/toggled automation as stepped line. 2014-11-28 21:15:28 -05:00
ea35595370 Add some newly introduced source files to our MSVC project (cairocanvas) 2014-11-28 14:42:17 +00:00
3d4b1d324e Fix calculation using uninitialized value.
Implicit "this" is the devil.
2014-11-27 04:15:30 -05:00
6edd81e4f6 get correct ::distance() and ::delta() implementations for cases involving achromatics 2014-11-26 18:22:22 +02: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
bd577a0663 Avoid possible use of uninitialized values.
This could only happen with a broken widget, but it shuts up clang and doesn't
hurt.
2014-11-18 02:55:03 -05:00
333c776e0e Fix MIDI region keyboard editing (add key handling to canvas). 2014-11-15 02:04:28 -05:00
9a9a8f78ef fix define 2014-11-13 19:05:58 +01:00
12b715e6fa tweak canvas on_expose_event() handler to avoid unnecessary save/paint/restore 2014-11-10 20:34:20 -05:00
fdcb792358 further work on new color manipulation code 2014-11-10 20:33:54 -05:00
1317b57221 add required header for compilation 2014-11-10 11:46:17 -05:00
ef56948d4a add background color property to Canvas::Canvas ; rearrange expose handling and include background fill
Conflicts:
	libs/canvas/canvas.cc
	libs/canvas/canvas/canvas.h
2014-11-10 10:43:25 -05:00
373caeede8 Add some newly introduced source files to our MSVC project (cairocanvas) 2014-11-08 10:48:26 +00:00
4260d0ca0e use new canvas colors header as necessary 2014-11-07 14:24:27 -05:00
69fd25f6f4 move canvas colors code into its own file(s) 2014-11-07 14:24:13 -05:00
a441de1a18 when drawing only part of a Canvas::Rectangle outline, we only need to do the cairo-pixel alignment math for the axis perpendicular to the edge 2014-11-07 12:58:56 -05:00
0fedfab593 tentative fix for canvas background/image surface 2014-11-07 16:50:21 +01:00
7670e463cc add API to extract color from ArdourCanvas::Text and tidy up member declarations
Conflicts:
	libs/canvas/canvas/text.h
2014-11-06 20:38:02 -05:00
787f9748b6 changing the clamp_width of an ArdourCanvas::Text needs to potentially provoke an entire redraw
This fixes missing range marker text in sessions where the initial zoom value causes an initial clamp_width of zero
2014-11-06 20:38:02 -05:00
c9c4a5c29d raising/lowering canvas items should trigger a redraw 2014-11-06 10:58:37 -05:00
ecd618c343 correct the rendering of Rectangle outlines, and the computation of their bounding box 2014-11-05 19:45:23 -05:00
857719f2e1 add Rect::shrink(Distance) even though it arguably should be handled by Rect::expand() 2014-11-05 19:45:23 -05:00
f3d349bc9a add some more outline enums to ArdourCanvas::Rectangle 2014-11-05 19:45:23 -05:00
589e59d7a1 allow derived classes to access Item::{scroll,position}_offset(), mostly for debugging purposes 2014-11-05 19:45:23 -05:00
b02ea3d435 alter implementation of ArdourCanvas::contrasting_text_color() to use gamma-adjusted luminance values rather than simple contrast 2014-11-05 11:13:28 -05:00
70e95f951d add ArdourCanvas::Fill::set_pattern() to allow any filled canvas item to be filled using an arbitrary Cairo Pattern 2014-11-05 11:13:09 -05:00
f1e6b28ab7 use ArdourCanvas::TimeRectangle for regions, notes, markers 2014-11-03 21:48:08 -05:00
56994e785e add new TimeRectangle to ArdourCanvas 2014-11-03 21:48:08 -05:00
90872c2b31 more changes for rectangle outlining 2014-10-31 10:56:08 -04:00
a942493565 comment fix and expansion re: Canvas::Rectangle outline 2014-10-31 10:56:08 -04:00
973d40e3ac Add support for USE_CAIRO_IMAGE_SURFACE when building with MSVC
(new preprocessor directive - greatly improves CPU loading)
2014-10-29 17:36:30 +00:00
b04414d170 allow to use cairo-image/software surface for canvas & cairowidgets 2014-10-28 02:15:10 +01:00
6dc3a4bf61 remove unused old API 2014-10-28 01:27:14 +01:00
65036cf3eb add #include that had gone unnoticed before 2014-10-24 12:18:46 -04:00
d3a4a92bd5 Containers should not consider the size of invisible items when computing their own bounding boxes.
This fixes issues related to the rulers container believing it was taller than it actually is, and possibly other issues also
2014-10-13 22:40:08 -04:00
b945fa69ba remove default/testing tooltips from the canvas 2014-10-13 13:53:07 -04:00
1bde96be09 there's no random() on window, but no matter 2014-09-30 19:08:16 +02:00
b4438942ca fix compiler warning from missing default statement in switch 2014-09-27 18:09:22 -04:00
2a53154892 end tooltip timeout and display for relevant leave notify events 2014-09-26 17:06:38 -04:00
df5a188825 further tweaks to canvas tooltip mechanism 2014-09-26 12:24:47 -04:00
bb68d83e43 display and position canvas tooltip window 2014-09-26 11:05:24 -04:00
d0dafc171c basic design of Canvas item tooltip mechanism.
No window yet to actually display the tooltip.
2014-09-25 21:43:15 -04:00
2e2390d053 alter the way the border of Canvas::Rectangle is drawn to meet the intent that a single pixel border passes through the corner coordinates 2014-09-22 11:36:04 -04: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
94adde7ebb add Canvas::Ruler::set_metric() to allow ruler metrics to be changed dynamically 2014-09-07 10:19:42 -04:00
1a6136e1e3 change Metric element of a Canvas::Ruler item into a pointer internally 2014-09-07 10:19:31 -04:00
158037bba2 Match canvas outline to rectangle
It looks like we're currently [consistently] off by 1px
everywhere. The width-1 is compensated by
TimeAxisViewItem::RIGHT_EDGE_SHIFT = 1
2014-09-01 18:05:09 +02:00
65715dd298 Make sure all our VC projects agree that the product is called 'Mixbus3' (as opposed to just 'Mixbus')
It'd be nice if we could use 'ARDOUR::config_dir_name' for this purpose (or perhaps 'PROGRAM_VERSION'). However, neither is implemented widely enough at present to make this practical. Keep an eye on them though, as possible future strategies.
2014-08-28 07:57:20 +01:00
5424119b55 Merge branch 'waveview_hacks' of https://github.com/nmains/ardour into cairocanvas 2014-07-18 10:46:22 -04:00
5044feec95 more canvas debugging for current item tracing 2014-07-18 10:43:52 -04:00
b2b736d596 tweaks for the monitor section. refactoring of some buttons, using new ArdourKnob instead of VolumeController. New ArdourDisplay shows a controllables user value, and provides support for preset values (hardcoded at present). Further refactoring to come, so that ArdourWidgets are derived from a common class. Controllable now has more responsibility for scaling between internal, user, and interface (knob percent) values. This also needs more refactoring and might have some unintended consequences. tested with audio and nothing seems amiss, yet. 2014-07-18 08:47:45 -05:00
928881b24a Update vcproj files for changed LILV config define. 2014-07-15 15:50:12 -04: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
a1bc2cb10e fix potential crash if certain Canvas methods are used before its window is realized 2014-07-07 08:00:20 -04:00
69a92e67f0 Add Canvas::re_enter() which picks the current item again based on mouse pointer position and generates an enter event for it 2014-07-07 07:53:17 -04: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
d816c225a4 more extensive canvas debug message for canvas-enter-leave tracing 2014-06-30 16:32:01 -04:00
79b9a044b8 add event-insensitivity to the list of conditions that causes a container to NOT add its children to the list of items-at-point 2014-06-30 16:31:31 -04:00
4eb565e0a9 verbose cursor text is always outlined 2014-06-30 10:39:41 -04:00
5974f4730b allow Canvas::Text to have outline drawn in a contrasting color (based on actual color) 2014-06-30 10:39:26 -04:00
471570705d move contrasting_text_color() into ArdourCanvas 2014-06-30 10:38:45 -04:00
33339090c3 invisible items/containers should not add their children to "items-at-point" 2014-06-30 08:32:26 -04:00
cf075743e4 additional DEBUG_TRACE message for canvas current item selection 2014-06-30 08:32:26 -04:00
cef26a4e1e Change some declarations from 'struct' to 'class' (and vice-versa) 2014-06-29 13:56:41 +01:00
22ce7c0762 Add (newly introduced) sources to our MSVC projects 2014-06-28 11:56:19 +01:00
ef78ad0d83 Remove (no longer needed) sources from our MSVC projects 2014-06-28 11:48:08 +01:00
c2dcd7eacd slightly increase size of a Canvas::PolyItem, to avoid left-over pixels when dragging (as well as other general incorrectness 2014-06-27 10:30:09 -04:00
a0cb2f95f0 if CANVAS_DEBUG is defined, then the env variable CANVAS_HARLEQUIN_DEBUGGING will turn on drawing the expose areas for canvas render debugging 2014-06-27 10:27:04 -04:00
6cc673f0a6 in Canvas::window_to_canvas(), if either x or y coordinate is less than zero, search for the scroll group on the relevant edge.
If we don't do this then we find no scroll group covering the event coordinate, and the translation for scroll fails to be applied
2014-06-27 10:19:21 -04:00
3accf1d2af new API for TrackingText and similar items 2014-06-26 15:10:24 -04:00
ae4c4c8f90 add tracking_text.cc to canvas wscript 2014-06-26 15:10:24 -04:00
f5d62b1486 new TrackingText canvas item, to resolve conceptual issues with the Editor::VerboseCursor 2014-06-26 15:10:24 -04:00
cd12698b9c Rename PBD::find_file_in_search_path to just PBD::find_file
saves a bit of typing and not necessary if you look at how it is used.
2014-06-25 12:40:10 -04:00
663f9827f9 last piece of scroll-wheel checkin, oops 2014-06-24 10:46:53 -05:00
2cc25a9d79 add scroll wheel handler to canvas 2014-06-24 10:33:28 -05: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
6a5d805b38 more canvas refactoring.
Remove Canvas::Layout, use Canvas::Container for the same purpose, move child-rendering into Item::render_children() so that it
could theoretically be used by any derived type.
2014-06-22 11:41:05 -04:00
f0933bf005 add missing new files for canvas redesign 2014-06-22 09:53:14 -04:00
99f9b3456a explicitly qualify cast to ArdourCanvas::Container so that it works.
I assume that gcc is failing to complain about ambiguity with Gtk::Container even though there should
really be no ambiguity
2014-06-22 09:29:16 -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
c1045881dd if we're not going to notify parents of bbox changes while an item is hidden, we need to remind it when the item is hidden or shown 2014-06-18 21:02:30 -04:00
36a34dc1a4 Merge branch 'canvas_tweaks' of https://github.com/nmains/ardour into cairocanvas 2014-06-18 11:20:10 -04:00
becf857f48 a whole slew of changes related to centralizing and rationalizing cursor management.
Debugging output left in place to help address the reports that will come in as people test this more
2014-06-18 10:24:59 -04:00
nick_m
0bd17ed2e4 Canvas tweaks.
* Only queue a draw for changed items that are set visible and in-window.
2014-06-19 00:06:32 +10:00
47efeb9f21 Merge branch 'cache_fixes' of https://github.com/nmains/ardour into cairocanvas 2014-06-17 11:35:13 -04:00
93bc93b6f6 a set of 3 fixes that cure Canvas::Text leaving dirty pixels when being dragged. or might not - testing is non-deterministic, which is alarming 2014-06-17 11:34:54 -04:00
f98e0a0707 use a different approach for indicating expose rects (from robin gareus). #ifdef'd out by default 2014-06-17 11:34:54 -04:00
nick_m
b31608f64e Cache entries are now region colour aware. 2014-06-18 00:16:51 +10:00
8050712503 comment correction regarding Canvas::visible_area() 2014-06-15 12:18:47 -04:00
dae45f1d75 initialize _scroll_parent in Canvas::item 2014-06-15 12:17:12 -04:00
69af017315 initialize uninitialized variable 2014-06-15 13:24:40 +02:00
55d51d38ce Add newly introduced sources to our MSVC projects 2014-06-15 09:56:49 +01:00
e59210c402 Remove no longer needed sources from MSVC projects 2014-06-15 09:55:34 +01: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
23d7893910 remove drag handle canvas object - it was just a stupid unfinished experiment 2014-06-12 10:40:43 -04:00
87a6f633a1 derive ArdourCanvas::Ruler from Rectangle 2014-06-12 10:35:16 -04:00
e1825361b5 remove hard-coded colors 2014-06-12 01:07:58 -04:00
143f9509ea many fixes and improvements for a now-working ArdourCanvas::Ruler item 2014-06-11 23:54:28 -04:00
f5fc4a6b09 add ruler.cc to canvas wscript 2014-06-11 23:54:28 -04:00
2cab65062d add Ruler to Canvas fwd.h 2014-06-11 23:54:28 -04:00
5ee4f41925 add initial (untested) implementation of canvas ruler item 2014-06-11 23:54:28 -04:00
7a3a66db72 fix Canvas::LineSet implementation to support horizontal and vertical linesets 2014-06-09 15:39:19 -04:00
f0c18abf55 remove global canvas scroll offset, to provide no-scroll-parent == no-scroll behaviour 2014-06-09 08:39:48 -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
c22e96522d Merge branch 'waveview_caching_for_upstream' of https://github.com/nmains/ardour into cairocanvas 2014-06-08 13:01:47 -04:00
nick_m
e495577f98 Use global clip level from prefs. Restore clip colour, \ 2014-06-09 02:50:14 +10:00
5e281d3b44 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-06-08 11:26:32 -04:00
153befa92c add Item::canvas_origin() for convenience 2014-06-08 11:26:32 -04: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
b54a2713a1 When rendering a Canvas::Rectangle take its _position into account, even though in general this is always (0,0) within its parent 2014-06-06 08:33:13 -04:00
792fe016e7 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-06-05 18:18:28 -04:00
ef9bf58359 fix problems with expose/redraws from canvas where requested area goes way outside the integer range allowed by GTK/GDK 2014-06-05 14:42:46 -04:00
8c79f70eef remove debugging output 2014-06-05 12:04:42 -04:00
1d354f746a basic, initial structure for canvas widget item 2014-06-05 12:04:42 -04:00
236926e7ca Add newly introduced sources to MSVC project
(scroll_group stuff)
2014-06-04 13:50:06 +01:00
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
d4989ed9ce fix missing leftover Canvas::pick_current_item() which was confusing button release event coordinates 2014-06-03 16:12:00 -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
ab60429efc test possible 'flickering' with nvidia 2014-05-31 18:22:34 +02:00
2342b7d611 don't allow waveform to bleed into TimeAxisViewItem frame border 2014-05-31 14:06:10 +02:00
161a3258ee Add newly introduced sources to MSVC project
(xfade_curve stuff)
2014-05-30 12:52:03 +01: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
202d926916 smoothen rendering of x-fades 2014-05-29 07:48:43 +02:00
604abffeb5 fix prev commit 2014-05-29 05:30:13 +02:00
86e7d86089 renice x-fade rendering w/cairo-antialiasing 2014-05-29 05:06: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
f1f8f89fcb exercise subsurface rendering for x-fade curves 2014-05-28 17:38:42 +02:00
c57fcde78c cairo sub-surface prototype - intermediate flattened group renderer. 2014-05-28 17:38:42 +02:00
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
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
bf4819ab0e "We brake for nobody." oh wait. - fixes Rectified Waveform view. 2014-05-26 22:45:42 +02:00
bdb342123f fix prev commit, window-offset for x-fade drawing 2014-05-26 18:22:21 +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
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
1b989a93c2 remove redundant os.path.join() calls when specifying install path as bld.env['LIBDIR'] 2014-04-28 21:18:02 -04:00
058986f77b finish unfinished work at basing all install paths on the program name 2014-04-28 21:11:08 -04:00
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
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
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
032f394b2a tiny red dots, be gone (expand poly_item bounding box by correct (?) amount) 2014-03-10 11:10:38 -04:00
ec0be1310f missing iterator advance 2014-03-10 11:10:38 -04:00
52c8b6d66a stupid hack to fix rectangle damage noise 2014-03-09 11:39:57 -04:00
6d3bd4e53c use fill transparency detection to avoid rendering transparent (invisible) rectangle fill area 2014-03-07 12:29:26 -05:00
12ef19d90a if a Fill object is given a zero-alpha (transparent) color, note that 2014-03-07 12:28:52 -05:00
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
621887cfaa slightly optimize bounding box computation for ArdourCanvas::PolyItem by avoiding inner conditional 2014-03-07 11:24:51 -05:00
e5802bdbea move an assert to cover only cases where it is needed 2014-03-07 11:23:22 -05:00
2a6fc5af74 tweak Polygon::render() to work whether or not fill or outline are unset 2014-03-06 23:15:59 -05:00
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
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
e6849e9c7e "correct" curve drawing (no artifacts during redraw)
Interpolation errors still need addressing.
2014-03-04 21:58:17 -05:00
c29d392b0c tentative intermediate state for ArdourCanvas::Curve 2014-03-04 21:58:17 -05:00
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
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
912f07b919 mingw build fixes (tested with i686-w64-mingw32 on linux-x86_64) 2014-03-04 15:25:58 +01:00
e6c3cece64 remove recently added conflation of mingw64 and msvc with respect to symbol export 2014-03-02 14:59:08 -05:00
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
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
e60933650e remove debug messages, for now 2014-02-28 17:17:00 -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
0cbf8f7dea fix canvas enter/leave bug when point is over a group/ignore-event item and we fail to send a leave event to the previous item 2014-02-25 16:08:36 -05:00
f9a3e7f8bb add DEBUG::CanvasEnterLeave to allow runtime toggling of canvas enter/leave events 2014-02-25 16:07:51 -05:00
737aae908a tweak canvas rect drawing to correctly place bottom edge of rectangle inside the bounds (cairo works in mysterious ways) 2014-02-25 12:02:50 -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
14b2d0b549 fix error in canvas PolyLine::covers(), so that the mouse can actually enter/leave such items 2014-02-19 23:42:01 -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
1df483d3db since we now expand rectangles to the right always, adjust the bounding box computation 2014-02-14 09:49:16 -05:00
1a9076c0ba remove debug message 2014-02-13 18:18:53 -05:00
08b86fda5c fix up some issues with precise placement of ArdourCanvas::Rectangle frame/outline 2014-02-13 18:18:19 -05:00
79d2a686ff make Item::set_position() do nothing if the position doesn't change 2014-02-13 18:18:19 -05:00
f889f391a1 Guard some Debug output so that it only appears when applicable ('Item::name' is only available when CANVAS_DEBUG is defined) 2014-02-13 14:12:36 +00:00
f5499d206a slight code tidy for Line::render() ... don't use 0.5 pixel adjustment if the line width > 1.0 2014-02-12 15:26:53 -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
6876906d9d fix major thinko in ArdourCanvas::Group::clear() 2014-02-11 22:49:39 -05:00
a329a44cc1 when delivering canvas events, if an item is grabbed, use it in preference to Canvas::_current_item, but still propagate to its ancestors if left unhandled 2014-02-11 22:49:10 -05:00
cc2aca44fb fix text placement in ArdourCanvas::Flag 2014-02-11 12:40:44 -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
3c5a870289 a better, more general fix for the previous Canvas::item_going_away() issue. There is no need to repick the current item if the item going away is NOT the current item 2014-01-20 10:59:44 -05:00
2691209050 When removing an item which is event-insensitive, there is no need to repick the current item, since it can never have been used as the current item.
This fixes crashes associated with ghost notes in midi regions.
2014-01-20 10:53:58 -05:00
620e1e6677 add event type string function to canvas (since it does not use gtkmm2ext) 2014-01-16 10:52:34 -05:00
fbe94f4470 pixel-align canvas PolyItems with single-pixel outlines, for crispness 2014-01-13 09:39:50 -05:00
5062a00c7d move -fvisibility=hidden to the top of the source tree, and remove its internal use; use libtimecode as a shared lib again 2014-01-12 15:40:47 -05:00
22c303d8f6 final (?) tweaks to rectangle rendering 2014-01-10 14:36:05 -05:00
9df593d823 clamp expose (queue_redraw()) requests to visible window area, some extra debugging details 2014-01-10 14:35:36 -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
6d4c0baad3 fix up thinko in recent raise_to_top/lower_to_bottom optimization 2014-01-10 11:54:05 -05:00
70c4a5e2d6 slightly expand CanvasRender debug output 2014-01-10 11:02:34 -05:00
ffdf3ed017 don't go through ::deliver_enter_leave() unnecessarily 2014-01-10 11:02:05 -05:00
5cd35de56b prevent Rect::expand() from generating negative coordinates where there were none before 2014-01-08 18:20:19 -05:00
cf293d0593 tweak rectangle bounding box computation 2014-01-08 10:42:14 -05:00
35d3a4a351 remove unused code 2014-01-08 10:31:39 -05:00
a70edc5765 change rounding used for convert Rect from canvas to window coordinates 2014-01-08 10:31:14 -05:00
98dec658ee Revert "remove unused code"
This reverts commit 2d283c17e1.
2014-01-08 10:29:03 -05:00
2d283c17e1 remove unused code 2014-01-08 10:28:46 -05:00
8fa54cd1d9 shrink waveview zero line to single pixel 2014-01-07 22:51:18 -05:00
c235d3da99 mostly fix conceptual error in how canvas rectangle frames are drawn 2014-01-07 20:56:36 -05:00
5fec68e6c5 for now, hide ugly circle thing in drag handles 2014-01-07 20:56:03 -05:00
d1652f8cc6 outline width of 0.5 is stupid and meaningless, and was just hiding other issues with outlines 2014-01-07 11:31:47 -05:00
7914d45f27 add missing iterator increment to poly item renders. 2014-01-06 20:45:40 -05:00
4b71d7fde5 small optimization to curve rendering 2014-01-06 20:45:40 -05:00
7b24be86a2 make raise_to_top() and lower_to_bottom() no-ops if item is already in the right place 2014-01-02 16:49:42 -05:00
7f83975e7d add drag handle source to wscript 2014-01-02 16:49:11 -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
110c790d91 define signal associated with configurable clipping level to Canvas::WaveView 2013-12-30 15:54:09 -05:00