Commit graph

146 commits

Author SHA1 Message Date
GZharun
75a26bead0 [Summary] Fixed issue when width request from Cavas text returned old width value
[Reviewed by] Paul Davis
2014-12-15 13:17:44 +02:00
VKamyshniy
798dd38be0 [SUMMARY] Corrected (C) info 2014-12-11 10:05:20 +02:00
Paul Davis
74707d900c do the right thing when TrackingText::offset is changed 2014-11-25 20:44:26 +02:00
Paul Davis
c3e0cad199 Fix method hiding in Canvas::Text 2014-11-25 20:44:01 +02:00
Paul Davis
ca506df094 add API to Ruler to optionally draw a divider (2 single pixel horizontal lines) at some position within the vertical extent of the ruler 2014-11-24 19:29:22 +02:00
Paul Davis
5ffa87b8ad add Rectangle::vertical_fraction() as a convenience method 2014-11-24 19:29:22 +02:00
Paul Davis
781c525643 add background color property to Canvas::Canvas ; rearrange expose handling and include background fill 2014-11-10 10:35:29 -05:00
Paul Davis
0ae0477945 add API to extract color from ArdourCanvas::Text and tidy up member declarations 2014-11-06 20:36:11 -05:00
Robin Gareus
6c34ab8b02 allow to use cairo-image/software surface for canvas & cairowidgets
Conflicts:
	libs/gtkmm2ext/cairo_widget.cc
2014-11-03 10:03:45 -05:00
Robin Gareus
a1b7c8c91e remove unused old API 2014-11-03 09:32:49 -05:00
VKamyshniy
43a80f8266 [Summary] Changing contents of Marker and RangeMarker objects in order to change request from Igor 2014-10-30 17:47:42 +02:00
GZharun
e10d06d032 [Summary] Should have been committed with previous: made background fade optional and not shown by default 2014-09-26 23:43:18 +03:00
Paul Davis
98d1200f2c add ArdourCanvas::Fill::set_pattern() to allow any filled canvas item to be filled using an arbitrary Cairo Pattern 2014-09-19 16:24:40 -04:00
Paul Davis
75a150ecc0 make computation of OS X pango text width correction less intrusive/more efficient.
Compute the correction only once after each font specification setting.
2014-09-19 16:24:40 -04:00
Paul Davis
9b405de03d add Canvas::Ruler::set_metric() to allow ruler metrics to be changed dynamically 2014-09-05 14:45:27 -04:00
Paul Davis
8c17bb0ca0 change Metric element of a Canvas::Ruler item into a pointer internally 2014-09-05 14:42:06 -04:00
GZharun
9b010ed417 [Summary] Fixed name width issue on MAC applying a workaround. It's a response on Pango bug which will be fixed by Paul Davis 2014-09-05 15:29:41 +03:00
nick_m
baf6a43ee7 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-08-18 12:26:05 -04:00
Paul Davis
207e90adb1 Add Canvas::re_enter() which picks the current item again based on mouse pointer position and generates an enter event for it 2014-08-17 20:41:20 -04:00
Paul Davis
a647755bdc verbose cursor text is always outlined 2014-08-17 19:59:51 -04:00
Paul Davis
b4aba271f4 move contrasting_text_color() into ArdourCanvas 2014-08-17 19:59:38 -04:00
John Emmas
8c77efd3ff Change some declarations from 'struct' to 'class' (and vice-versa) 2014-08-17 19:56:56 -04:00
Paul Davis
92b29e1ea1 new API for TrackingText and similar items 2014-08-17 19:28:47 -04:00
Paul Davis
f9f0bfe6ed new TrackingText canvas item, to resolve conceptual issues with the Editor::VerboseCursor 2014-08-17 18:53:52 -04:00
Ben Loftis
d0f41a4f5e add scroll wheel handler to canvas 2014-08-17 18:10:15 -04:00
Paul Davis
87cc9f7d4f 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-08-17 18:07:24 -04:00
Paul Davis
28fdc71d70 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-08-17 17:44:17 -04:00
Paul Davis
72ab6f6fe5 add missing new files for canvas redesign 2014-08-17 17:44:12 -04:00
Paul Davis
98aa604aa0 refactor Canvas so that all Items have children; add Container abstract base class; rename Group as "Layout" and retain only drawing semantics 2014-08-17 17:42:59 -04:00
nick_m
36a93b0d18 Cache entries are now region colour aware. 2014-08-17 15:33:22 -04:00
Paul Davis
452cf1db35 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-08-17 15:08:56 -04:00
Paul Davis
3cec76834e remove drag handle canvas object - it was just a stupid unfinished experiment 2014-08-17 15:08:46 -04:00
Paul Davis
1a3596b071 derive ArdourCanvas::Ruler from Rectangle 2014-08-17 15:08:33 -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
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
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
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
c926ca2b6b basic, initial structure for canvas widget item 2014-08-17 14:44:25 -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
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