Commit Graph

381 Commits

Author SHA1 Message Date
Paul Davis
6c499b180b canvas: add a method to prevent extensive item coordinate math during ::prepare_for_render_children()
Also, auto-ify a loop in Item::prepare_for_render_children()
2025-07-29 18:16:35 -06:00
Paul Davis
6a67a6bcc4 new canvas item: RectSet
a collection of rectangles, conceptually similar to LineSet

this avoids keeping around N different Canvas::Rectangles and instead
collapses a related set of them down to a single item
2025-06-02 18:30:40 -06:00
Paul Davis
4a6716e39c add option for a minor/micro tick font description to ArdourCanvas::Ruler 2025-05-19 14:57:19 -06:00
Robin Gareus
cdb7c8c4d1 Fix touch-related canvas ptr grab
This fixes an issue when canvas left double button click
pops up a dialog. Focus needs to propagate to the dialog.

see also 05f3ac50cc
2025-02-25 23:30:52 +01:00
Robin Gareus
000c25edcc Update gtkmm -> ytkmm header location (omnibus commit) 2025-02-01 15:25:14 +01:00
Robin Gareus
233fc890de Update gdkmm -> ydkmm header location (omnibus commit) 2025-02-01 15:01:52 +01:00
Robin Gareus
07866caf1e Update gdk -> ydk header location (omnibus commit) 2025-02-01 13:37:48 +01:00
Robin Gareus
58f1d46e31 One font to rule the rulers.
Remove bold fonts for Bar/beats and font-size
inconsistency on macOS (VerySmall, SmallBold).

This reverts commit e3dc0a24f2.
and 14318dd342
and a76afae0e9
and 7c27f617dc
and 20029ec7e6
2025-01-23 19:43:26 +01:00
Robin Gareus
4866baacf5 Release NSGLView, fixes heap-use-after-free 2024-12-06 18:52:04 +01:00
Robin Gareus
ac6c00da26 Add support for Touch events to Ardour Canvas 2024-12-02 21:13:16 +01:00
Alejandro Domínguez
5223b176f3 Replace boost::shared_array<T> with std::shared_ptr<T[]> 2024-11-06 23:03:19 +01:00
Alejandro Domínguez
9544855fdd Remove unused headers 2024-11-06 22:50:35 +01:00
Paul Davis
c1ad49a411 skeleton for a canvas button 2024-11-05 13:27:22 -07:00
Mads Kiilerich
b4ff4f356c Make header files more self-contained - add missing Ardour and lib includes 2024-10-20 03:30:46 +02:00
Robin Gareus
ff95d81612 Reduce reliance on boost - the easy part
* boost::unordered_map -> std::unordered_map
* BOOST_STATIC_ASSERT/static_assert
* BOOST_FOREACH -> for
* boost::tuple -> std::tuple/g
* boost::math::isnormal -> std::isnormal
* boost::container::set -> std::set
* boost::none -> std::nullopt
* boost::optional -> std::optional
2024-10-19 03:41:16 +02:00
Alejandro Domínguez
2436b4df06 Replace boost::noncopyable with C++11 deleted copy constructors 2024-10-19 01:04:15 +02:00
Robin Gareus
2d7cce44f1 Replace PBD::Signals (1/2) 2024-10-18 20:41:08 +02:00
Paul Davis
adfba3d39d allow runtime control over cairo save/restore around item rendering
This is to allow easier debugging of whether a given item's render method fails to leave a cairo
context in the same state it received it in
2024-03-22 13:39:03 -06:00
Paul Davis
e64af8e4ed add a test for an environment variable before switching canvas single-expose off 2024-03-18 11:28:16 -06:00
Paul Davis
4b563ae518 move CairoCanvas::render() implementation for ArdourCanvas::Canvas into source
Note that this implementation only redraws a single (cairo_rectangle_t-defined) rect, and cannot
provide sub-rects the way that a normal GDK/GTK expose-driven redraw can
2024-03-18 10:50:36 -06:00
Paul Davis
71e085d825 ensure that the canvas fully redraws after style/visibility events 2024-03-18 10:49:15 -06:00
Robin Gareus
92d6cb9933 Fix alloc-dealloc-mismatch (video image) 2023-12-12 20:36:55 +01:00
Paul Davis
cd99fed7cd canvas: add PolyItem::clear() 2023-09-30 11:09:58 -06:00
Paul Davis
de67226c90 provide PolyItem::pop_back() 2023-07-09 20:41:36 -06:00
Paul Davis
91500795d8 canvas: extend PolyItem API with ::add_point() 2023-06-26 14:18:18 -06:00
Paul Davis
8a204bcf51 lollis: draw stems in fill color (optionally) 2023-06-26 14:18:18 -06:00
Paul Davis
a6c1a3d9d0 lollis: potentially clip circle with a bounding parent 2023-06-26 14:18:18 -06:00
Paul Davis
96c9f2ee19 canvas: add velocity() method to Note 2023-06-26 14:18:18 -06:00
Paul Davis
279e648a43 canvas: ArdourCanvas::Lollipop to not (mis)use _position 2023-06-26 14:18:18 -06:00
Paul Davis
f7e97be115 canvas lollipops: object redesign and reimplementation 2023-06-26 14:18:17 -06:00
Paul Davis
7e4a3dce01 lollipop pixel pushing 2023-06-26 14:18:17 -06:00
Paul Davis
4bafadc419 steps to an ecology of lollipops 2023-06-26 14:18:17 -06:00
Paul Davis
187569dcbc new Lollipop canvas item 2023-06-26 14:18:17 -06:00
Paul Davis
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
Paul Davis
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
Paul Davis
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
Robin Gareus
509504acf2 Add API to set openGL backing scale 2023-02-04 22:25:52 +01:00
Robin Gareus
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
Paul Davis
4cd7de7a6f debugging: allow selection no-draw for canvas fill, outline, text, lineset and waveview 2023-01-20 18:13:12 -07:00
Paul Davis
ab34861388 canvas: provide a means of blocking change notifications from Item propagating up the object tree 2022-12-10 13:37:16 -07:00
Robin Gareus
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
Robin Gareus
34e7c2ffc5 Remove cruft (unused CANVAS_COMPATIBILITY - 1/3) 2022-11-19 21:49:01 +01:00
David Robillard
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
Paul Davis
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
Paul Davis
02b05f295a use selected (outline) color for MIDI note velocity bar (thanks, cooltehno, for the idea) 2022-08-31 13:53:43 -06:00
Paul Davis
5a0019f9a6 canvas: comment out unimplemented method 2022-08-03 12:08:57 -06:00
luz paz
36226cfd0a Fix various typos in libs/canvas 2022-08-03 12:07:46 -06:00
Paul Davis
ef07fb601a libcanvas: FramedCanvas::covers() method is ill-conceived. Use PolyItem::covers() 2022-05-29 14:19:02 -06:00
Paul Davis
f913373351 canvas: change Item::bb_clean() to better named Item::set_bbox_clean() 2022-04-26 22:04:08 -06:00
Paul Davis
c75ceb31ab canvas: when an item has its bbox marked dirty, this should propagate to all parents 2022-04-26 22:04:08 -06:00