summaryrefslogtreecommitdiffstats
path: root/src/sp-image.h
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-04-05 19:07:38 +0000
committerMarkus Engel <markus.engel@tum.de>2013-04-05 19:07:38 +0000
commit61003d31ea058fdf94f4f80c753c3e38426f35e4 (patch)
treede30fe5c58fc71682c9544448f8ef7f79de673cf /src/sp-image.h
parentMerged more classes. (diff)
downloadinkscape-61003d31ea058fdf94f4f80c753c3e38426f35e4.tar.gz
inkscape-61003d31ea058fdf94f4f80c753c3e38426f35e4.zip
Merged FlowX classes.
(bzr r11608.1.79)
Diffstat (limited to 'src/sp-image.h')
-rw-r--r--src/sp-image.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/src/sp-image.h b/src/sp-image.h
index 5fa57ce1c..54bbf19b4 100644
--- a/src/sp-image.h
+++ b/src/sp-image.h
@@ -14,11 +14,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#define SP_TYPE_IMAGE (sp_image_get_type ())
#define SP_IMAGE(obj) ((SPImage*)obj)
-#define SP_IS_IMAGE(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPImage)))
-
-class CImage;
+#define SP_IS_IMAGE(obj) (dynamic_cast<const SPImage*>((SPObject*)obj))
/* SPImage */
@@ -29,10 +26,10 @@ class CImage;
#define SP_IMAGE_HREF_MODIFIED_FLAG SP_OBJECT_USER_MODIFIED_FLAG_A
-class SPImage : public SPItem {
+class SPImage : public SPItem, public CItem {
public:
SPImage();
- CImage* cimage;
+ virtual ~SPImage();
SVGLength x;
SVGLength y;
@@ -60,17 +57,6 @@ public:
GdkPixbuf *pixbuf;
gchar *pixPath;
time_t lastMod;
-};
-
-struct SPImageClass {
- SPItemClass parent_class;
-};
-
-
-class CImage : public CItem {
-public:
- CImage(SPImage* image);
- virtual ~CImage();
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
@@ -85,14 +71,8 @@ public:
virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs);
virtual Geom::Affine set_transform(Geom::Affine const &transform);
-
-protected:
- SPImage* spimage;
};
-
-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, Glib::ustring const &mime);