13
0
Commit Graph

55 Commits

Author SHA1 Message Date
03b4635bea
Fix a small memory leak 2023-04-19 14:20:48 +02: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
4cd7de7a6f debugging: allow selection no-draw for canvas fill, outline, text, lineset and waveview 2023-01-20 18:13:12 -07:00
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
211b3ea668 canvas text: generalize ::font_size_for_height() to handle different font families 2021-10-19 10:54:27 -06:00
ab22733fe4 canvas: continuously variable Canvas::Text height if packed inside a layout-sensitive container 2021-10-17 17:56:27 -06:00
ad6afbe68a canvas: use Item::bb_clean() to mark _bounding_box_dirty false 2021-08-13 12:51:36 -06:00
54de7c70ee Canvas: print item colors in hex when debugging 2021-08-13 12:51:27 -06:00
8fb67e15ea steps in the evolution of beatbox 2021-08-13 12:51:26 -06:00
04d00da461 Canvas: fix text rendering geometry 2021-08-13 12:51:26 -06:00
d6fa458f3b Canvas: Text item should take position into account when rendering 2021-08-13 12:51:25 -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
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
34d6de83a0 Disable Retina/Appple pango text-width workaround
Fix right-alignment (tempo-markers) and oversized bounding-boxes.
_width_correction should be removed after testing on various systems.
2017-03-11 05:13:17 +01: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
1552547f65 stop using gkd_pango_context_get() in ArdourCanvas::Canvas and require concrete instances to supply a Pango::Context; do this for GtkCanvas and Push2Canvas 2016-10-13 17:18:54 -04:00
81f2ed452b provide ArdourCanvas::Text::{width,height}() 2016-09-27 14:59:32 -05:00
nick_m
4f7a4cd233 Crapola - this is an experimental performance hack that must be reverted. 2016-05-27 23:38:14 +10: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
57321bef35 consistent pango-text layout size - fixes #6490
Use gdk_pango_layout() for all text-size calculations.
In Canvas::Text always use the same context (local image surface)
for layouting (prior to this, local and window-context mix resulted in 
different sizes).
2015-09-06 16:39:08 +02:00
d65f03d074 fixes for canvas text display on Retina (from Valeriy) 2015-06-16 07:52:00 -04:00
b86a8edcff NOOP, reindent code. 2015-06-13 22:05:29 +02:00
c8e16998bf fix crash on OSX displaying MIDI sysex, or similar text. 2015-06-13 22:04:31 +02:00
2828dcaaf9 make computation of OS X pango text width correction less intrusive/more efficient.
Compute the correction only once after each font specification setting.

Conflicts:
	libs/canvas/canvas/text.h
2015-04-29 08:20:31 -04:00
a83050a255 manually apply grygorii's API to manage a correction for pango errors in text size computation on OS X 2015-04-29 08:19:22 -04:00
GZharun
96371c8327 [Summary] Fixed issue when width request from Cavas text returned old width value
[Reviewed by] Paul Davis

Conflicts:
	libs/canvas/canvas/text.h
2015-04-29 07:27:34 -04:00
d9cb8a807e Fix method hiding in Canvas::Text 2015-04-29 07:25:58 -04:00
4260d0ca0e use new canvas colors header as necessary 2014-11-07 14:24:27 -05:00
787f9748b6 changing the clamp_width of an ArdourCanvas::Text needs to potentially provoke an entire redraw
This fixes missing range marker text in sessions where the initial zoom value causes an initial clamp_width of zero
2014-11-06 20:38:02 -05:00
5974f4730b allow Canvas::Text to have outline drawn in a contrasting color (based on actual color) 2014-06-30 10:39:26 -04: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
93bc93b6f6 a set of 3 fixes that cure Canvas::Text leaving dirty pixels when being dragged. or might not - testing is non-deterministic, which is alarming 2014-06-17 11:34:54 -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
f28fb76bd9 fix computation of Text bounding box to respect _clamped_width 2013-10-28 12:27:33 -04:00
097b781209 fix computation of canvas text item bounding box 2013-10-24 17:12:28 -04:00
0e656f0a13 workaround/hack/fix for cairo pattern gradient space exceeding 2^16 size limit 2013-06-27 10:41:00 -04:00
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
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
691be68ac2 fix rect redraw problems caused by intersection requiring the usual 0.5 expansion (though consider a more general fix for this at teh group level) 2013-06-18 13:46:24 -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
a0044e5f71 add back various functionality to waveviews such as zero line, amplitude scaling 2013-04-16 10:07:52 -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
393ba98422 tweak time axis view item text positioning; allow ArdourCanvas::Text to have its width clamped, and use this as TAVI's get narrow so that text doesn't overflow 2013-04-15 14:45:22 -04:00
7e19053b88 Fix dragging objects on the canvas and remove redundant canvas groups
Delivery of fake motion events to the editor needed the event coordinates to be
in canvas space, as they are with "real" events. Editor and other objects had
many redundant groups from timbyr's work on gnomecanvas to scroll by moving
groups. We don't need this anymore with cairo-canvas (though possibly a
stationay background group for the canvas might be useful again one day as in
the SAE logo. Its implementation would be fairly different though, since we
would have to explicitly move the group on every scroll, since nothing else
ever moves on scroll).

Also tweaks to text item placement, and switch TimeAxisViewItem from
name_pixbuf to name_text, since ArdourCanvas::Text is already "pixbuf optimized".
2013-04-15 13:50:05 -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