13
0
Commit Graph

31 Commits

Author SHA1 Message Date
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
bf7b35388b rationalize and centralize computation of positional offset and scroll offset for canvas items 2014-06-03 16:11:24 -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
fed5599baa smooth visual curve drawing 2014-05-30 03:04:02 +02:00
e5802bdbea move an assert to cover only cases where it is needed 2014-03-07 11:23:22 -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
79d2a686ff make Item::set_position() do nothing if the position doesn't change 2014-02-13 18:18:19 -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
7bbd28aa08 notable changes to try to improve most of enter/leave handling for canvas items 2013-10-30 23:36:30 -04:00
5ebc4a99be don't request redraw of a Canvas item if it marked invisible 2013-10-25 13:29:23 -04:00
ecd29c6d70 add Item::redraw() convenience method 2013-10-24 17:54:54 -04:00
37743ea9b1 minor fixes for recent cairocanvas work so that it builds on OS X (64bit) 2013-07-01 12:04:02 -04:00
77f5f4c4bf basically operational switch to canvas drawing coordinates, although text and waves don't work, and redraw areas are too small 2013-06-18 08:23:06 -04:00
737433c446 tweaks to improve enter/leave event handling - fixes at least some crashes caused by this stuff 2013-04-24 18:31:00 -04:00
b36e085001 add back change lost during branch merging 2013-04-21 18:57:55 -04:00
b02a7445bf Revert "add Group::clear(), do not clear _canvas member of Item when unparented (only the parent is changed)"
This reverts commit a4df65a56f83823aba27432685977f420458a213.
2013-04-21 15:35:20 -04:00
fca81c9a6a add Group::clear(), do not clear _canvas member of Item when unparented (only the parent is changed) 2013-04-21 15:35:20 -04:00
d1a05240ef fix clamping of line and rect coordinates to avoid issues with cairo when drawing way outside a surface's dimensions; move various coordinate methods down to Canvas, because they don't require GTK information; make visible_area() a Canvas virtual method so that we don't have to cast to call it 2013-04-17 10:53:17 -04:00
c1df3295c1 virtual Fill:: and Outline:: methods so that Canvas::Items that cache image renderings of themselves can invalidate those caches when colors etc. change; add Item::{begin,end}_visual_change() so that we can notify the canvas more efficiently when *only* visual properties have changed and not the bounding box (probably needs to be used more widely) 2013-04-16 20:38:10 -04:00
37dd7e952b add headers to all canvas .cc and .h files 2013-04-15 22:10:18 -04:00
64d3763652 remove all xml++.h inclusion by canvas implementations 2013-04-15 22:00:13 -04:00
84fb0a8dce remove all XML related API from canvas. it may have been useful during development, but it is just a distraction - we will NEVER be saving or restoring canvas state via XML or any kind of serialized state 2013-04-15 21:57:08 -04:00
af4539f857 a few changes to fix region dragging, all related to coordinate system handling, which is now much simpler with the new canvas; more debugging output when asked for 2013-04-15 10:38:12 -04:00
4e84bc3a39 changes to get cairocanvas branch to build on OS X, with its stupid nil and Rect macros, plus some const_cast<> and unused variable fixes that should really be in master but will have to wait till we rebase master 2013-04-12 21:46:44 -04:00
ee1f0520a8 many changes to get the cairo-canvas version much, much more functional. still problems with a lot of subtle and not-so-subtle issues 2013-04-11 20:19:22 -04:00
053eaf77fd a variety of fixes for the cairocanvas, but it still buggy as hell handling events and lots of other stuff 2013-04-09 14:22:58 -04:00
1267b1d61c mo' better debugging of canvas "structure" via Item::dump and derivatives 2013-04-08 19:48:09 -04:00
07a505b1b2 lots of tweaking and adding debug output including operator<</dump(ostream&) methods to help visualize canvas structure 2013-04-05 11:27:26 -04:00
19bd641915 commit immediately post linking 2013-04-04 18:45:27 -04:00
aaea166135 initial commit of hand merging, plus getting "ancient" waf script to work correctly 2013-04-04 00:32:52 -04:00