add API to directly request access to pixbuf
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
#ifndef __CANVAS_PIXBUF__
|
||||
#define __CANVAS_PIXBUF__
|
||||
|
||||
#include <glibmm/refptr.h>
|
||||
|
||||
#include "canvas/item.h"
|
||||
@@ -20,8 +23,14 @@ public:
|
||||
|
||||
void set (Glib::RefPtr<Gdk::Pixbuf>);
|
||||
|
||||
/* 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<Gdk::Pixbuf> pixbuf();
|
||||
|
||||
private:
|
||||
Glib::RefPtr<Gdk::Pixbuf> _pixbuf;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -44,6 +44,11 @@ Pixbuf::set (Glib::RefPtr<Gdk::Pixbuf> pixbuf)
|
||||
end_change ();
|
||||
}
|
||||
|
||||
Glib::RefPtr<Gdk::Pixbuf>
|
||||
Pixbuf::pixbuf() {
|
||||
return _pixbuf;
|
||||
}
|
||||
|
||||
XMLNode *
|
||||
Pixbuf::get_state () const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user