David Robillard
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
David Robillard
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
David Robillard
d194ec9135
Update arrow bbox when geometry changes.
2015-01-16 19:13:56 -05:00
David Robillard
e48ff6b6a0
Fix clipping for scroll groups an offset bbox.
2015-01-16 19:13:56 -05:00
David Robillard
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
Robin Gareus
0367aa5825
remove cruft (old unused pre-git version files)
2015-01-09 06:11:57 +01:00
David Robillard
ec17b5388f
Fix bounding box of rectangles with wide outlines.
2015-01-08 18:36:10 -05:00
David Robillard
7985624037
Close polygon borders (fix partially drawn hits).
2015-01-08 11:09:38 -05:00
David Robillard
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
David Robillard
86242348ec
Fix crash when getting width of item with no bbox.
2014-12-24 16:02:56 -05:00
Paul Davis
a494211e73
add ArdourCanvas::change_alpha()
...
Time to move away from rgba macros
2014-12-19 09:53:26 -05:00
Paul Davis
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
Paul Davis
9831006c8e
add getters for SVAModifier
2014-12-15 12:06:53 -05:00
Paul Davis
995bcd3aa0
fix typo
2014-12-15 09:29:04 -05:00
Paul Davis
aa57e9e032
more fixes to SVAModifier constructor(s)
2014-12-15 09:03:52 -05:00
Paul Davis
3fa4063d9b
fix up SVAModifier constructors
2014-12-14 23:41:31 -05:00
Paul Davis
427b93055f
add SVAModifier to ArdourCanvas color code
2014-12-14 23:34:36 -05:00
Paul Davis
624a86c39d
lots more color work, closer and closer to being ready for ... being taken apart again
2014-12-08 22:02:38 -05:00
Paul Davis
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
David Robillard
60f4f5b9d8
Fix inappropriately massive flag font.
2014-12-06 16:07:32 -05:00
Robin Gareus
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
Paul Davis
207fd04587
include alpha-delta computation in HSV::delta()
2014-12-05 09:01:55 -05:00
Paul Davis
db3d42d551
first pass at optimization for low-level canvas code
2014-12-02 05:32:34 -05:00
David Robillard
f190e630ab
Show discrete/toggled automation as stepped line.
2014-11-28 21:15:28 -05:00
John Emmas
ea35595370
Add some newly introduced source files to our MSVC project (cairocanvas)
2014-11-28 14:42:17 +00:00
David Robillard
3d4b1d324e
Fix calculation using uninitialized value.
...
Implicit "this" is the devil.
2014-11-27 04:15:30 -05:00
Paul Davis
6edd81e4f6
get correct ::distance() and ::delta() implementations for cases involving achromatics
2014-11-26 18:22:22 +02:00
Paul Davis
318a9edab9
massive reworking of color selection implementation
2014-11-26 18:22:22 +02:00
David Robillard
ea5876b836
Remove dead code.
2014-11-25 02:11:44 -05:00
David Robillard
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
David Robillard
333c776e0e
Fix MIDI region keyboard editing (add key handling to canvas).
2014-11-15 02:04:28 -05:00
Robin Gareus
9a9a8f78ef
fix define
2014-11-13 19:05:58 +01:00
Paul Davis
12b715e6fa
tweak canvas on_expose_event() handler to avoid unnecessary save/paint/restore
2014-11-10 20:34:20 -05:00
Paul Davis
fdcb792358
further work on new color manipulation code
2014-11-10 20:33:54 -05:00
Paul Davis
1317b57221
add required header for compilation
2014-11-10 11:46:17 -05:00
Paul Davis
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
John Emmas
373caeede8
Add some newly introduced source files to our MSVC project (cairocanvas)
2014-11-08 10:48:26 +00:00
Paul Davis
4260d0ca0e
use new canvas colors header as necessary
2014-11-07 14:24:27 -05:00
Paul Davis
69fd25f6f4
move canvas colors code into its own file(s)
2014-11-07 14:24:13 -05:00
Paul Davis
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
Robin Gareus
0fedfab593
tentative fix for canvas background/image surface
2014-11-07 16:50:21 +01:00
Paul Davis
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
Paul Davis
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
Paul Davis
c9c4a5c29d
raising/lowering canvas items should trigger a redraw
2014-11-06 10:58:37 -05:00
Paul Davis
ecd618c343
correct the rendering of Rectangle outlines, and the computation of their bounding box
2014-11-05 19:45:23 -05:00
Paul Davis
857719f2e1
add Rect::shrink(Distance) even though it arguably should be handled by Rect::expand()
2014-11-05 19:45:23 -05:00
Paul Davis
f3d349bc9a
add some more outline enums to ArdourCanvas::Rectangle
2014-11-05 19:45:23 -05:00
Paul Davis
589e59d7a1
allow derived classes to access Item::{scroll,position}_offset(), mostly for debugging purposes
2014-11-05 19:45:23 -05:00
Paul Davis
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
Paul Davis
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