13
0

Add PreRender signal to the canvas

Emitted by the canvas immediately before rendering.
This commit is contained in:
Tim Mayberry 2017-03-13 20:45:13 +10:00
parent 9618b6dcbb
commit dac25b8db9
2 changed files with 4 additions and 0 deletions

View File

@ -101,6 +101,8 @@ Canvas::zoomed ()
void void
Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context) const Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context) const
{ {
PreRender (); // emit signal
#ifdef CANVAS_DEBUG #ifdef CANVAS_DEBUG
if (DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) { if (DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) {
cerr << this << " RENDER: " << area << endl; cerr << this << " RENDER: " << area << endl;

View File

@ -135,6 +135,8 @@ public:
*/ */
sigc::signal<void,Duple const&> MouseMotion; sigc::signal<void,Duple const&> MouseMotion;
sigc::signal<void> PreRender;
/** Ensures that the position given by @param winpos (in window /** Ensures that the position given by @param winpos (in window
coordinates) is within the current window area, possibly reduced by coordinates) is within the current window area, possibly reduced by
@param border. @param border.