summaryrefslogtreecommitdiffstats
path: root/src/sp-image.h
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2013-09-19 00:57:10 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2013-09-19 00:57:10 +0000
commit083367b313247a4cf0c082fff25e993892dc38d1 (patch)
tree35e5da339ef5d30a333270d644ac1d61e6ed6620 /src/sp-image.h
parentMerge in patch for Jabiertxo Arraiza Cenoz in bug lp:1127103 (diff)
downloadinkscape-083367b313247a4cf0c082fff25e993892dc38d1.tar.gz
inkscape-083367b313247a4cf0c082fff25e993892dc38d1.zip
Encapsulate the shared memory hack for Cairo and GdkPixbuf in a class
called Inkscape::Pixbuf. Replace usage in the code as appropriate. (bzr r12531)
Diffstat (limited to 'src/sp-image.h')
-rw-r--r--src/sp-image.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/sp-image.h b/src/sp-image.h
index c197f6473..d137c7bf4 100644
--- a/src/sp-image.h
+++ b/src/sp-image.h
@@ -1,9 +1,6 @@
-#ifndef __SP_IMAGE_H__
-#define __SP_IMAGE_H__
-
-/*
+/** @file
* SVG <image> implementation
- *
+ *//*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* Edward Flick (EAF)
@@ -14,21 +11,24 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#define SP_TYPE_IMAGE (sp_image_get_type ())
-#define SP_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_IMAGE, SPImage))
-#define SP_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_IMAGE, SPImageClass))
-#define SP_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_IMAGE))
-#define SP_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_IMAGE))
-
-/* SPImage */
+#ifndef SEEN_INKSCAPE_SP_IMAGE_H
+#define SEEN_INKSCAPE_SP_IMAGE_H
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glibmm/ustring.h>
#include "svg/svg-length.h"
#include "sp-item.h"
+#define SP_TYPE_IMAGE (sp_image_get_type ())
+#define SP_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_IMAGE, SPImage))
+#define SP_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_IMAGE, SPImageClass))
+#define SP_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_IMAGE))
+#define SP_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_IMAGE))
+
#define SP_IMAGE_HREF_MODIFIED_FLAG SP_OBJECT_USER_MODIFIED_FLAG_A
+namespace Inkscape { class Pixbuf; }
+
struct SPImage : public SPItem {
SVGLength x;
SVGLength y;
@@ -53,9 +53,7 @@ struct SPImage : public SPItem {
gchar *color_profile;
#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
- GdkPixbuf *pixbuf;
- gchar *pixPath;
- time_t lastMod;
+ Inkscape::Pixbuf *pixbuf;
};
struct SPImageClass {
@@ -66,7 +64,7 @@ GType sp_image_get_type (void);
/* Return duplicate of curve or NULL */
SPCurve *sp_image_get_curve (SPImage *image);
-void sp_embed_image(Inkscape::XML::Node *imgnode, GdkPixbuf *pb);
+void sp_embed_image(Inkscape::XML::Node *imgnode, Inkscape::Pixbuf *pb);
void sp_image_refresh_if_outdated( SPImage* image );
#endif