Commit graph

120 commits

Author SHA1 Message Date
Paul Davis
84f55440a3 fix redrawing of canvas with an optimized build
Best guess right now is that optimization does something bad when ceil() is called twice on a very large dbl-precision number,
which results in a zero (empty) redraw area. Without the removal of the redundant ceil & floor functions, no expose events
would be delivered to the canvas in an optimized build during drags (and maybe more).
2013-12-23 15:35:49 -05:00
Paul Davis
9b6135b2e1 change enter/exit event delivery to follow X Window model (inferior, ancestor, virtual, nonlinear) 2013-12-12 20:44:04 -05:00
Paul Davis
88732abd01 change event propagation to be based on parent/child lineage, not z-axis stacking, plus some more alterations to try to get enter/leave working 2013-12-12 10:03:33 -05:00
Paul Davis
a631350f93 implement Curve::covers() in a very primitive way (also note: fails for actual spline curves) 2013-12-09 21:03:16 -05:00
Paul Davis
c4f0063a68 make PolyLine use distance_to_segment_squared(), and add separate (null, for now) method Curve::covers(Duple) because the math there needs to be different, maybe 2013-12-09 17:24:34 -05:00
Paul Davis
77a63c2bf7 ArdourCanvas::Line::covers() uses distance_to_segment_squared() 2013-12-09 13:39:10 -05:00
Paul Davis
4780c84252 debug trace tweaks 2013-12-09 13:38:22 -05:00
Paul Davis
75b25cd913 add a utility function to Canvas to compute distance from a point to a line segment 2013-12-09 13:35:07 -05:00
Paul Davis
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
Paul Davis
08b485db75 send enter events to EVERY newly entered item (ignore the bool return from the event handler); other canvas debugging aids;switch items_at_point() to use canvas coordinates 2013-11-03 10:07:00 -05:00
Paul Davis
85daa31ab5 all events propagate out of the canvas in canvas coordinates now, so revert changes in editor_drags.cc that worked around this not being the case 2013-10-31 16:43:35 -04:00
Paul Davis
b46244d527 finally (?) fix up logic for rectangle drawing (fill+stroke) to tackle what is hopefully the last of the expose problems 2013-10-31 11:49:36 -04:00
Paul Davis
7ce86cec7d handle enter/leave items when zooming and scrolling occur 2013-10-31 03:10:18 -04:00
Paul Davis
7bbd28aa08 notable changes to try to improve most of enter/leave handling for canvas items 2013-10-30 23:36:30 -04:00
Paul Davis
006ba7cd36 reduce verbiage and remove visible current_item red rect 2013-10-28 16:36:11 -04:00
Paul Davis
f6d33d2a87 fix comment 2013-10-28 16:35:48 -04:00
Paul Davis
30263a91d7 fix coordinate system for Canvas items_at_point() methods 2013-10-28 16:35:31 -04:00
Paul Davis
f28fb76bd9 fix computation of Text bounding box to respect _clamped_width 2013-10-28 12:27:33 -04:00
Paul Davis
1eb680f937 add coordinate space comment 2013-10-28 12:27:03 -04:00
Paul Davis
f25ff95390 tweak whitespace and add coordinate space comment 2013-10-28 12:26:40 -04:00
Paul Davis
0db7bdface streamline button press event handling code a little, and tweak enter/leave debugging text 2013-10-28 12:25:41 -04:00
Paul Davis
5ebc4a99be don't request redraw of a Canvas item if it marked invisible 2013-10-25 13:29:23 -04:00
Paul Davis
ecd29c6d70 add Item::redraw() convenience method 2013-10-24 17:54:54 -04:00
Paul Davis
c3f1369cfd expand bounding box of all objects by 0.5 before computing intersection for render cycle; alter debug output 2013-10-24 17:14:12 -04:00
Paul Davis
c21ed2b877 fix drawing of a canvas LineSet object 2013-10-24 17:13:22 -04:00
Paul Davis
9d2e4fbec6 fix computation of rectangle bounding box 2013-10-24 17:13:03 -04:00
Paul Davis
097b781209 fix computation of canvas text item bounding box 2013-10-24 17:12:28 -04:00
Paul Davis
5ea6b4420b slightly more information in group render DEBUG_TRACE output 2013-10-23 10:39:26 -04:00
Paul Davis
192f22d89e fix confusion in Canvas::LineSet over window vs. item coordinates that affected redraw (or not) of MIDI track note lines when the canvas origin != 0 2013-10-22 21:12:47 -04:00
Paul Davis
18850253e9 only generate some current canvas debug output when CANVAS_DEBUG is defined, to quieten things down 2013-09-25 10:38:04 -04:00
Paul Davis
67bb9a732a add casting for MSVC sqrt 2013-09-25 10:36:42 -04:00
Paul Davis
3ba0ef7192 fix a typo in canvas-debug.h 2013-09-25 10:36:21 -04:00
Paul Davis
741154e691 debugging various canvas event issues 2013-08-08 15:26:42 -04:00
Robin Gareus
c37040ef01 expand tabs to spaces in wscript 2013-07-14 19:39:24 +02:00
Paul Davis
37743ea9b1 minor fixes for recent cairocanvas work so that it builds on OS X (64bit) 2013-07-01 12:04:02 -04:00
Paul Davis
af3056769c changes to waveform clipping display
* clip level is now -0.9dbFS
   * display of clipping is optional (see Theme Manager window)
   * clipping is based on disk data, unscaled by region gain
2013-06-28 20:21:30 -04:00
Paul Davis
aa480b8338 make clip indicators more visible (the smaller of 7 pixels or 5% of track height) 2013-06-28 17:09:39 -04:00
Paul Davis
5b3ebe824e restore display of clipping in waveform displays 2013-06-28 13:40:51 -04:00
Paul Davis
144fdfbbd0 fix drawing of rectangles larger than 2000 pixels, caused by silly hard-coding of width limit 2013-06-27 17:27:58 -04:00
Paul Davis
c6fe6b0996 cleanup ArdourCanvas::WaveView
Mostly this just involved removing the private CacheEntry class that really served no further purpose once
the design reverted to a single cached image
2013-06-27 17:23:34 -04:00
Paul Davis
0e656f0a13 workaround/hack/fix for cairo pattern gradient space exceeding 2^16 size limit 2013-06-27 10:41:00 -04:00
Paul Davis
f9936d7d3c move text origin back down, since it was a mistake to move it; alter computation of text bounding box to more accurate and efficient (not done yet) 2013-06-26 17:55:42 -04:00
Paul Davis
2c3d570582 tweak position of pango-rendered text image on canvas by 2 pixels upward
this is an arbitrary tweak but seems to work well thus far
2013-06-26 12:29:44 -04:00
Paul Davis
57ff5e3198 fix gradient pattern origin translation for time axis view items
note: the solution is non-obvious, but the obvious one of applying a translational Cairo::Matrix to the gradient
caused an exception to be thrown because of a non-invertible matrix.
2013-06-25 20:41:24 -04:00
Paul Davis
2108525187 fix up size and drawing of measure lines, even when vertically scrolled 2013-06-24 23:03:11 -04:00
Paul Davis
a1f858d3b2 an awful lot of tweaks to drawing details 2013-06-24 16:28:53 -04:00
Paul Davis
0ce393f051 likely fix for Canvas::Image positioning under new coordinate/render rules 2013-06-22 14:59:43 -04:00
Paul Davis
11becd4a6b properly restore newer (cairo-canvas related) UI config parameters 2013-06-21 17:15:56 -04:00
Paul Davis
a079118981 fix incorrect coordinate space when drawing first poly-curve line 2013-06-21 13:56:01 -04:00
Paul Davis
1c74a3ab2d waveform drawing improvements
* handle logscaled and rectified
    * put dark tips in right places
    * improve color selection algorithm
2013-06-21 13:17:37 -04:00