13
0
Commit Graph

70 Commits

Author SHA1 Message Date
f913373351 canvas: change Item::bb_clean() to better named Item::set_bbox_clean() 2022-04-26 22:04:08 -06:00
c75ceb31ab canvas: when an item has its bbox marked dirty, this should propagate to all parents 2022-04-26 22:04:08 -06:00
b416caf1bb canvas: several steps further with box packing and size allocation 2021-08-13 12:51:37 -06:00
a1c67b4ad7 canvas: remove intrinsic size concept, fall back to requested size; converge on gtk style size_request 2021-08-13 12:51:37 -06:00
6f883650d8 canvas: use combined outline enum value for clarity 2021-08-13 12:51:37 -06:00
71fe17a241 canvas: impl of Rectangle::dump() 2021-08-13 12:51:37 -06:00
ad6afbe68a canvas: use Item::bb_clean() to mark _bounding_box_dirty false 2021-08-13 12:51:36 -06:00
860d43697c Canvas: propagate ::size_allocate() down the item tree
This previously wasn't done because of fear that it would affect the traditional fixed-sized canvas,
but only items that _layout_sensitive (i.e. are packed into a constraint packer directly) will
actually do anything in ::size_allocate().

Possibly might want to relax this to cover items that have a constraint packer between them
and a root group.
2021-08-13 12:51:27 -06:00
28f85747ca Canvas: fix behavior of Rectangle when used in a constraint packer
::size_allocate() sets the _position *and* the "self" rect appropriately
2021-08-13 12:51:27 -06:00
b18aaf0c7c Rectangle border/sizing behaves like CSS border-box 2021-08-13 12:51:27 -06:00
35a9bcc409 add Rectangle::size_request() which returns actual rectangle size, not bounding box 2021-08-13 12:51:26 -06:00
9869b0266b add support for rounded corners to Canvas::Rectangle 2021-08-13 12:51:26 -06:00
4f671a0950 make ArdourCanvas::Rectangle render its children
it is common to want to pack things inside a rectangle, so make it work
2021-08-13 12:51:26 -06:00
91de7ba60b do not double-translate Canvas::Rectangle by _position; item_to_window() already includes it by calling item_to_canvas() 2021-08-13 12:51:26 -06:00
0d5725a63b Canvas; fix rectangle rendering geometry 2021-08-13 12:51:26 -06:00
711c1520b5 Revert "towards a very different constraint layout tester"
This reverts commit 7f65ffe57685304f59bb336c9701c3a9d5cdc1a7.
2021-08-13 12:51:26 -06:00
11931f5ffb towards a very different constraint layout tester 2021-08-13 12:51:26 -06:00
240cb7b98f Canvas: make Rectangle work with layouts 2021-08-13 12:51:26 -06:00
5957e14259
Remove unused #include<> (2/2)
PBD::stacktrace() is not used nor needed by default.
It should be used sparingly.
2021-05-05 17:57:16 +02:00
cec5ce8f45
Update canvas/UI lib GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
5102d8fae1 minor code optimization for Rectangle::render() 2018-07-03 09:22:32 -04:00
601c317d70 Clean up library inheritance (colors.h, utils.h)
make libwidget independent of libcanvas.
Confine basics to pbd and gtkmm2ext.
2017-07-17 21:06:04 +02:00
4fa4b9a135 remove use of boost::optional to define "undefined" Canvas::Rect, and use Rect::empty instead.
This commit includes Rect::operator bool() which might be a candidate for removal in a future commit, in an attempt
to make the meaning clearer
2017-01-19 20:54:54 +01:00
5d43d2e43f don't do as much work if a Rectangle has no outline width or outline what values 2016-09-27 14:59:32 -05:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
38728f0835 correct implementation for Rectangle::vertical_fraction() 2015-04-29 07:22:21 -04:00
59ce8663f9 add Rectangle::vertical_fraction() as a convenience method
Conflicts:
	libs/canvas/rectangle.cc
2015-04-29 07:22:05 -04:00
0f2ead3d6b fix redraw of automation ControlPoints 2015-03-20 23:31:21 +01:00
a992a2e6e0 simplify Canvas::Rectangle rendering to avoid unnecessary nonsense, and remove TimeRectangle 2015-02-11 21:59:38 -05:00
c679d616f6 correct drawing of rectangle borders.
They need to use fractional coordinates, and the border position needed
generalizing for other border widths. See verbose comment for details
2015-02-09 16:41:28 -05:00
ec17b5388f Fix bounding box of rectangles with wide outlines. 2015-01-08 18:36:10 -05:00
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
ecd618c343 correct the rendering of Rectangle outlines, and the computation of their bounding box 2014-11-05 19:45:23 -05:00
f1e6b28ab7 use ArdourCanvas::TimeRectangle for regions, notes, markers 2014-11-03 21:48:08 -05:00
56994e785e add new TimeRectangle to ArdourCanvas 2014-11-03 21:48:08 -05:00
90872c2b31 more changes for rectangle outlining 2014-10-31 10:56:08 -04:00
a942493565 comment fix and expansion re: Canvas::Rectangle outline 2014-10-31 10:56:08 -04:00
2e2390d053 alter the way the border of Canvas::Rectangle is drawn to meet the intent that a single pixel border passes through the corner coordinates 2014-09-22 11:36:04 -04:00
158037bba2 Match canvas outline to rectangle
It looks like we're currently [consistently] off by 1px
everywhere. The width-1 is compensated by
TimeAxisViewItem::RIGHT_EDGE_SHIFT = 1
2014-09-01 18:05:09 +02:00
a8bd6ecc4f refactor Canvas so that all Items have children; add Container abstract base class; rename Group as "Layout" and retain only drawing semantics 2014-06-21 11:43:42 -04:00
590882f3c8 change Canvas heirarchy and constructors
Items no longer need a parent group (they require a Canvas pointer instead), so all constructors have been rationalized
and have two variants, one with a parent and one with a canvas.

All Items now inherit from Fill and Outline, to banish diagonal inheritance and virtual base classes and all that.

There were zero changes to the Ardour GUI arising from these changes.
2014-06-12 14:53:44 -04:00
b54a2713a1 When rendering a Canvas::Rectangle take its _position into account, even though in general this is always (0,0) within its parent 2014-06-06 08:33:13 -04:00
c2946ee00f don't queue redraws when various canvas item properties are "reset" to the same value, plus supporting functions 2014-03-11 07:36:09 -04:00
52c8b6d66a stupid hack to fix rectangle damage noise 2014-03-09 11:39:57 -04:00
6d3bd4e53c use fill transparency detection to avoid rendering transparent (invisible) rectangle fill area 2014-03-07 12:29:26 -05:00
737aae908a tweak canvas rect drawing to correctly place bottom edge of rectangle inside the bounds (cairo works in mysterious ways) 2014-02-25 12:02:50 -05:00
1df483d3db since we now expand rectangles to the right always, adjust the bounding box computation 2014-02-14 09:49:16 -05:00
1a9076c0ba remove debug message 2014-02-13 18:18:53 -05:00
08b86fda5c fix up some issues with precise placement of ArdourCanvas::Rectangle frame/outline 2014-02-13 18:18:19 -05:00