13
0

add Item::redraw() convenience method

This commit is contained in:
Paul Davis 2013-10-24 17:54:54 -04:00
parent c3f1369cfd
commit ecd29c6d70
2 changed files with 10 additions and 0 deletions

View File

@ -56,6 +56,8 @@ public:
Item (Group *, Duple); Item (Group *, Duple);
virtual ~Item (); virtual ~Item ();
void redraw () const;
/** Render this item to a Cairo context. /** Render this item to a Cairo context.
* @param area Area to draw, in **window** coordinates * @param area Area to draw, in **window** coordinates
* *

View File

@ -328,6 +328,14 @@ Item::width () const
return 0; return 0;
} }
void
Item::redraw () const
{
if (_bounding_box && _canvas) {
_canvas->request_redraw (item_to_canvas (_bounding_box.get()));
}
}
void void
Item::begin_change () Item::begin_change ()
{ {