summaryrefslogtreecommitdiff
path: root/libs/canvas
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2017-03-13 20:45:13 +1000
committerTim Mayberry <mojofunk@gmail.com>2017-06-26 08:40:47 +1000
commitdac25b8db9686f4a6dd03fcc2d616004b1c1dd44 (patch)
treebd4542fbf0f663bfc4154cf7c3197b42db0705ca /libs/canvas
parent9618b6dcbbc6f7e1e657d5aa859e07d528928d53 (diff)
Add PreRender signal to the canvas
Emitted by the canvas immediately before rendering.
Diffstat (limited to 'libs/canvas')
-rw-r--r--libs/canvas/canvas.cc2
-rw-r--r--libs/canvas/canvas/canvas.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/libs/canvas/canvas.cc b/libs/canvas/canvas.cc
index fb06b06b97..be61b6cb84 100644
--- a/libs/canvas/canvas.cc
+++ b/libs/canvas/canvas.cc
@@ -101,6 +101,8 @@ Canvas::zoomed ()
void
Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context) const
{
+ PreRender (); // emit signal
+
#ifdef CANVAS_DEBUG
if (DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) {
cerr << this << " RENDER: " << area << endl;
diff --git a/libs/canvas/canvas/canvas.h b/libs/canvas/canvas/canvas.h
index 934f1fe08e..2f506fc3c0 100644
--- a/libs/canvas/canvas/canvas.h
+++ b/libs/canvas/canvas/canvas.h
@@ -135,6 +135,8 @@ public:
*/
sigc::signal<void,Duple const&> MouseMotion;
+ sigc::signal<void> PreRender;
+
/** Ensures that the position given by @param winpos (in window
coordinates) is within the current window area, possibly reduced by
@param border.