diff --git a/src/sp-clippath.h b/src/sp-clippath.h
index 239dca04957045f80df39bee65465630c481c10f..a622df1f6b351401faead55c43ac8c8a59c73cec 100644 (file)
--- a/src/sp-clippath.h
+++ b/src/sp-clippath.h
-#ifndef __SP_CLIPPATH_H__
-#define __SP_CLIPPATH_H__
+#ifndef SEEN_SP_CLIPPATH_H
+#define SEEN_SP_CLIPPATH_H
/*
* SVG <clipPath> implementation
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
+ * Abhishek Sharma
+ * Jon A. Cruz <jon@joncruz.org>
*
* Copyright (C) 2001-2002 authors
* Copyright (C) 2001 Ximian, Inc.
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#define SP_TYPE_CLIPPATH (SPClipPath::sp_clippath_get_type ())
-#define SP_CLIPPATH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_CLIPPATH, SPClipPath))
-#define SP_CLIPPATH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_CLIPPATH, SPClipPathClass))
-#define SP_IS_CLIPPATH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_CLIPPATH))
-#define SP_IS_CLIPPATH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_CLIPPATH))
+#define SP_TYPE_CLIPPATH (SPClipPath::sp_clippath_get_type())
+#define SP_CLIPPATH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_CLIPPATH, SPClipPath))
+#define SP_CLIPPATH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SP_TYPE_CLIPPATH, SPClipPathClass))
+#define SP_IS_CLIPPATH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_CLIPPATH))
+#define SP_IS_CLIPPATH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_CLIPPATH))
class SPClipPathView;
#include "xml/node.h"
class SPClipPath : public SPObjectGroup {
- public:
- class Reference;
+public:
+ class Reference;
+
+ unsigned int clipPathUnits_set : 1;
+ unsigned int clipPathUnits : 1;
- unsigned int clipPathUnits_set : 1;
- unsigned int clipPathUnits : 1;
+ SPClipPathView *display;
+ static const gchar *create(GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform);
+ static GType sp_clippath_get_type(void);
- SPClipPathView *display;
- static const gchar *create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform);
- static GType sp_clippath_get_type (void);
+ NRArenaItem *show(NRArena *arena, unsigned int key);
+ void hide(unsigned int key);
- NRArenaItem *sp_clippath_show(NRArena *arena, unsigned int key);
- void sp_clippath_hide(unsigned int key);
+ void setBBox(unsigned int key, NRRect *bbox);
+ void getBBox(NRRect *bbox, Geom::Matrix const &transform, unsigned const flags);
- void sp_clippath_set_bbox(unsigned int key, NRRect *bbox);
- void sp_clippath_get_bbox(NRRect *bbox, Geom::Matrix const &transform, unsigned const flags);
- private:
- static void sp_clippath_init(SPClipPath *clippath);
+private:
+ static void init(SPClipPath *clippath);
- static void sp_clippath_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
- static void sp_clippath_release(SPObject * object);
- static void sp_clippath_set(SPObject *object, unsigned int key, gchar const *value);
- static void sp_clippath_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
- static void sp_clippath_update(SPObject *object, SPCtx *ctx, guint flags);
- static void sp_clippath_modified(SPObject *object, guint flags);
- static Inkscape::XML::Node *sp_clippath_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
+ static void build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
+ static void release(SPObject * object);
+ static void set(SPObject *object, unsigned int key, gchar const *value);
+ static void childAdded(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
+ static void update(SPObject *object, SPCtx *ctx, guint flags);
+ static void modified(SPObject *object, guint flags);
+ static Inkscape::XML::Node *write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
- friend class SPClipPathClass;
+ friend class SPClipPathClass;
};
class SPClipPathClass {
- public:
- SPObjectGroupClass parent_class;
- private:
- static void sp_clippath_class_init(SPClipPathClass *klass);
- static SPObjectGroupClass *static_parent_class;
+public:
+ SPObjectGroupClass parent_class;
- friend class SPClipPath;
-};
+private:
+ static void sp_clippath_class_init(SPClipPathClass *klass);
+ static SPObjectGroupClass *static_parent_class;
-//GType sp_clippath_get_type (void);
+ friend class SPClipPath;
+};
class SPClipPathReference : public Inkscape::URIReference {
public:
- SPClipPathReference(SPObject *obj) : URIReference(obj) {}
- SPClipPath *getObject() const {
- return (SPClipPath *)URIReference::getObject();
- }
+ SPClipPathReference(SPObject *obj) : URIReference(obj) {}
+ SPClipPath *getObject() const {
+ return (SPClipPath *)URIReference::getObject();
+ }
+
protected:
/**
* If the owner element of this reference (the element with <... clippath="...">)
* \return false if obj is not a clippath or if obj is a parent of this
* reference's owner element. True otherwise.
*/
- virtual bool _acceptObject(SPObject *obj) const {
- if (!SP_IS_CLIPPATH(obj)) {
- return false;
- }
- SPObject * const owner = this->getOwner();
+ virtual bool _acceptObject(SPObject *obj) const {
+ if (!SP_IS_CLIPPATH(obj)) {
+ return false;
+ }
+ SPObject * const owner = this->getOwner();
if (obj->isAncestorOf(owner)) {
- //XML Tree being used directly here while it shouldn't be...
+ //XML Tree being used directly here while it shouldn't be...
Inkscape::XML::Node * const owner_repr = owner->getRepr();
- //XML Tree being used directly here while it shouldn't be...
+ //XML Tree being used directly here while it shouldn't be...
Inkscape::XML::Node * const obj_repr = obj->getRepr();
gchar const * owner_name = NULL;
gchar const * owner_clippath = NULL;
return false;
}
return true;
- }
+ }
};
-/*NRArenaItem *sp_clippath_show(SPClipPath *cp, NRArena *arena, unsigned int key);
-void sp_clippath_hide(SPClipPath *cp, unsigned int key);
-
-void sp_clippath_set_bbox(SPClipPath *cp, unsigned int key, NRRect *bbox);
-void sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags);*/
+#endif // SEEN_SP_CLIPPATH_H
-//const gchar *sp_clippath_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform);
-
-#endif
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :