13
0
Commit Graph

889 Commits

Author SHA1 Message Date
8a204bcf51 lollis: draw stems in fill color (optionally) 2023-06-26 14:18:18 -06:00
a6c1a3d9d0 lollis: potentially clip circle with a bounding parent 2023-06-26 14:18:18 -06:00
96c9f2ee19 canvas: add velocity() method to Note 2023-06-26 14:18:18 -06:00
279e648a43 canvas: ArdourCanvas::Lollipop to not (mis)use _position 2023-06-26 14:18:18 -06:00
a7af6fc6f8 lollipops: just directly set _position member 2023-06-26 14:18:17 -06:00
1ad0894618 lollipops should render child items (currently none) 2023-06-26 14:18:17 -06:00
51e7584dee another use of auto iterators 2023-06-26 14:18:17 -06:00
cfbe6b6048 another use of auto iterators 2023-06-26 14:18:17 -06:00
f7e97be115 canvas lollipops: object redesign and reimplementation 2023-06-26 14:18:17 -06:00
0f611b4efa C++ auto iteration FTW 2023-06-26 14:18:17 -06:00
7e4a3dce01 lollipop pixel pushing 2023-06-26 14:18:17 -06:00
4bafadc419 steps to an ecology of lollipops 2023-06-26 14:18:17 -06:00
0b050c47e4 build lollipops.cc 2023-06-26 14:18:17 -06:00
187569dcbc new Lollipop canvas item 2023-06-26 14:18:17 -06:00
7dc9bf157b fix measure line drawing (convert to window coords for intersection check) 2023-06-16 09:16:53 -06:00
248e37ac0c canvas LineSet: fix rendering to get coordinates precisely correct 2023-06-15 20:10:32 -06:00
a7c4ab3247 fix thinko in canvas logic (fixes mouse cursor on desensitized playhead) 2023-05-01 08:49:27 -05:00
03b4635bea
Fix a small memory leak 2023-04-19 14:20:48 +02:00
a1e9dfb672 canvas lineset: C++11-ification 2023-04-10 09:18:44 -06:00
4f87506e5c do not sort lineset every time a coord is added; use RAII to create scope and sort at end 2023-04-09 14:36:03 -06:00
9e0c1ff510 Revert "canvas: when an item is shown, potentially pick it as the current item"
This reverts commit 37cae2f971.

This changes causes issues with recursive calls to the enter/leave event handling
stacks in gtk2_adour. Semantically, the change makes perfect sense, but finding
a solution to the recursion is challenging.
2023-03-30 09:54:56 -06:00
edca8209aa canvas: fix debug output after auto-fication 2023-03-24 14:19:16 -06:00
3036414e08 tempo: auto-fication of another loop 2023-03-24 14:19:16 -06:00
37cae2f971 canvas: when an item is shown, potentially pick it as the current item 2023-03-24 14:19:16 -06:00
b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
39ed528e25 std-ize: convert all boost shared/weak ptr includes to <memory>
Also fix stdint.h -> cstdint and alphabetically order std includes
2023-03-24 14:19:15 -06:00
5ee7941895 Only use render-group when container is not opaque 2023-02-05 22:34:38 +01:00
509504acf2 Add API to set openGL backing scale 2023-02-04 22:25:52 +01:00
d12dd4015d
Revert canvas debugging
This reverts commit 8359311849.
This reverts commit f377822891.
This reverts commit 859d6ebe4a.
This reverts commit 4cd7de7a6f.
2023-02-04 18:23:18 +01:00
8359311849 debug: allow to profile exposure (revert this later) 2023-02-01 19:41:11 +01:00
b7ac434584 canvas: invalidate scrollgroup, request redraw after scrolling 2023-02-01 02:57:10 +01:00
902b98588e canvas: profile render time / area 2023-02-01 01:25:27 +01:00
f377822891 (temporarily) add nodraw bitflag to avoid gradient fills 2023-01-24 10:01:04 -07:00
859d6ebe4a debug: log canvas exposure area 2023-01-21 17:36:22 +01:00
4cd7de7a6f debugging: allow selection no-draw for canvas fill, outline, text, lineset and waveview 2023-01-20 18:13:12 -07:00
3ae7295142
Allow to disable cairo render groups (performance test) 2023-01-06 21:15:43 +01:00
ab34861388 canvas: provide a means of blocking change notifications from Item propagating up the object tree 2022-12-10 13:37:16 -07:00
70b00f5201
Canvas: allow to group rendering of child items
> This group functionality can be convenient for performing
> intermediate compositing. One common use of a group is to
> render objects as opaque within the group, (so that they
> occlude each other), and then blend the result with
> translucence onto the destination.
https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-push-group

The main use case where will be to render opaque layered
[MIDI] regions transparently onto a grid.
2022-12-10 02:37:04 +01:00
e3dc0a24f2 canvas ruler: use second font description appropriately 2022-11-29 10:09:39 -07:00
34e7c2ffc5
Remove cruft (unused CANVAS_COMPATIBILITY - 1/3) 2022-11-19 21:49:01 +01:00
0ef10e4f5f canvas: ruler never shows marks/text for points too close to display the label 2022-10-31 17:05:55 -06:00
bdacfb8724 Fix invalid use of Doxygen "@param" command
This is never for inline references to parameters, only for starting parameter
documentation blocks.  The "@p" command is for this, although unfortunately
Doxygen doesn't actually do anything with it and it's just an alias for code
text.
2022-10-30 20:44:28 -04:00
Mads Kiilerich
0b27d6e652
Fix proximity threshold for polyline
I'm not good with a mouse, so I found it hard to edit animation lines.
The mouse position has to be quite precise, with only a small threshold.

Looking at the code, AutomationLine sets the threshold for the PolyLine
to 4.0 . That seems to be a distance, and better for me than what I
experience.

The actual code in PolyLine is however comparing it directly to the
squared distance, making it more sensitive than expected.

Fixed by computing the squared threshold - also including the line
width.
2022-10-17 00:09:25 +02:00
Mads Kiilerich
d1265b5a02
Fix mouse events on clamped automation lines
This fixes the following problem:
When automation lines with significant change are zoomed in time, the
slope gets smaller (towards horizontal) as the control points moves
further away from the visible area. That was rendered correctly, but the
corresponding mouse events happened as if the line had a steeper slope.

The problem was caused by the X value being clamped to the visible area,
without scaling the Y value correspondingly. It has apparently been like
that for a decode, since introduced in c4f0063a68.

The problem is fixed by introducing a clamp2 function that scales the Y
value if clamping the X value.

Note: An old comment says that math goes wrong unless clamping below
COORD_MAX. It is not clear to me what math it refers to, and especially
why we don't need similar clamping on the lower bounds.

And while rarely a real problem, I guess it would be more correct and a
slight optimization to skip all lines where both ends are outside the
same bound. In theory, as it is now, the mouse could catch an invisible
line close to the border.
2022-10-17 00:09:25 +02:00
f13c4d1264 canvas: NOOP - meter, whitespace adjustment 2022-09-03 16:46:41 -06:00
e5bf2b7ee8 canvas: style, using braces with conditional 2022-09-03 16:46:41 -06:00
2313e3d333 canvas: meter bounding box does not rely on being on a canvas 2022-09-03 16:46:41 -06:00
b2ce5f0616 canvas: do not strip layout-sensitivity when adding items to a container 2022-09-03 16:46:41 -06:00
384530984a canvas: make "debug_render" into a per-canvas member variable
This allows us to debug rendering in specific canvases, rather
than all of them.
2022-09-03 16:46:41 -06:00
36663210c9 canvas: improve debug trace output during Box::reposition_children() 2022-09-03 16:46:41 -06:00