diff --git a/libs/canvas/canvas/pixbuf.h b/libs/canvas/canvas/pixbuf.h index 31efb1c1ef..0da7e4e7ea 100644 --- a/libs/canvas/canvas/pixbuf.h +++ b/libs/canvas/canvas/pixbuf.h @@ -1,3 +1,6 @@ +#ifndef __CANVAS_PIXBUF__ +#define __CANVAS_PIXBUF__ + #include #include "canvas/item.h" @@ -20,8 +23,14 @@ public: void set (Glib::RefPtr); + /* returns the reference to the internal private pixbuf + * after changing data in the pixbuf a call to set() + * is mandatory to update the data on screen */ + Glib::RefPtr pixbuf(); + private: Glib::RefPtr _pixbuf; }; } +#endif diff --git a/libs/canvas/pixbuf.cc b/libs/canvas/pixbuf.cc index e576003b57..ccb42fdf74 100644 --- a/libs/canvas/pixbuf.cc +++ b/libs/canvas/pixbuf.cc @@ -44,6 +44,11 @@ Pixbuf::set (Glib::RefPtr pixbuf) end_change (); } +Glib::RefPtr +Pixbuf::pixbuf() { + return _pixbuf; +} + XMLNode * Pixbuf::get_state () const {