summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e6a7236)
raw | patch | inline | side by side (parent: e6a7236)
author | Abhishek Sharma public <spyzerdotabhishek0at-signgmaildotcom> | |
Tue, 20 Jul 2010 10:44:23 +0000 (16:14 +0530) | ||
committer | Abhishek Sharma public <spyzerdotabhishek0at-signgmaildotcom> | |
Tue, 20 Jul 2010 10:44:23 +0000 (16:14 +0530) |
diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp
index d6f1f6b426cca8fa4d6c93d8abf1b95bd3608bbf..6838008bb2492804dd26c65983a0e7e5f79ea741 100644 (file)
--- a/src/box3d-side.cpp
+++ b/src/box3d-side.cpp
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node *repr = xml_doc->createElement("svg:path");
- repr->setAttribute("d", SP_OBJECT_REPR(side)->attribute("d"));
- repr->setAttribute("style", SP_OBJECT_REPR(side)->attribute("style"));
+ //repr->setAttribute("d", SP_OBJECT_REPR(side)->attribute("d"));
+ repr->setAttribute("d", side->getAttribute("d"));
+ //repr->setAttribute("style", SP_OBJECT_REPR(side)->attribute("style"));
+ repr->setAttribute("style", side->getAttribute("style"));
return repr;
}
diff --git a/src/conditions.cpp b/src/conditions.cpp
index 4a18a6913be5ddebf2bae19315a599260f279f39..7087abac252753cedaa028fa633807d8544d3fd6 100644 (file)
--- a/src/conditions.cpp
+++ b/src/conditions.cpp
/* function which evaluates if item should be displayed */
bool sp_item_evaluate(SPItem const *item) {
- Inkscape::XML::Node *grepr = SP_OBJECT_REPR (item);
+ //Inkscape::XML::Node *grepr = SP_OBJECT_REPR (item);
for ( unsigned int i = 0 ; i < sizeof(_condition_handlers)/sizeof(_condition_handlers[0]) ; i++ ) {
- gchar const *value = grepr->attribute(_condition_handlers[i].attribute);
+ //gchar const *value = grepr->attribute(_condition_handlers[i].attribute);
+ gchar const *value = item->getAttribute(_condition_handlers[i].attribute);
if ( NULL == value )
continue;
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp
index fd37fceed6dc7e7db9bd36e8068af7c09d97ec61..3e8359c579730a121735d954a1ab4010675e45f5 100644 (file)
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
_transformed_connection = item->connectTransformed(
sigc::ptr_fun(&avoid_item_move));
- const char *id = SP_OBJECT_REPR(item)->attribute("id");
+ //const char *id = SP_OBJECT_REPR(item)->attribute("id");
+ const char *id = item->getAttribute("id");
g_assert(id != NULL);
// Get a unique ID for the item.
diff --git a/src/desktop.h b/src/desktop.h
index 59ba3f957d14ae7d603faca46bedb31d5c2faa23..160a335580d0ab788e63a5026d42b34a7812bdae 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
*
* @see \ref desktop-handles.h for desktop macros.
*/
-struct SPDesktop : public Inkscape::UI::View::View
+class SPDesktop : public Inkscape::UI::View::View
{
+ public:
Inkscape::UI::Dialog::DialogManager *_dlg_mgr;
SPNamedView *namedview;
SPCanvas *canvas;
diff --git a/src/forward.h b/src/forward.h
index 41365611a71f4fa9711e55dde034e6327cfbcb69..e090b68b7891ca520ecf4b87dad98040596daf2d 100644 (file)
--- a/src/forward.h
+++ b/src/forward.h
class SPDocument;
class SPDocumentClass;
-#define SP_TYPE_DOCUMENT (sp_document_get_type ())
-#define SP_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_DOCUMENT, SPDocument))
-#define SP_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_DOCUMENT))
+//#define SP_TYPE_DOCUMENT (sp_document_get_type ())
+//#define SP_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_DOCUMENT, SPDocument))
+//#define SP_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_DOCUMENT))
-GType sp_document_get_type ();
+//GType sp_document_get_type ();
/* Objects */
index 8b4db3e25a1f7d4cb14ac3fa26f6d5a06f1819ba..7c93c5f07beed800b671dc272465d09c7a5b71ce 100644 (file)
@@ -2970,7 +2970,7 @@ sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_to_la
gchar const *mask_id = NULL;
if (apply_clip_path) {
- mask_id = sp_clippath_create(mask_items_dup, doc, &maskTransform);
+ mask_id = SPClipPath::create(mask_items_dup, doc, &maskTransform);
} else {
mask_id = sp_mask_create(mask_items_dup, doc, &maskTransform);
}
diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp
index 63e6175515a8931ba736d0e8598f0f5a7c0c9e09..d074ef197f248bb3e48b7f74fd1e19c3091aa51e 100644 (file)
--- a/src/sp-clippath.cpp
+++ b/src/sp-clippath.cpp
NRRect bbox;
};
-static void sp_clippath_class_init(SPClipPathClass *klass);
+/*static void sp_clippath_class_init(SPClipPathClass *klass);
static void sp_clippath_init(SPClipPath *clippath);
static void sp_clippath_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
@@ -46,22 +46,23 @@ static void sp_clippath_set(SPObject *object, unsigned int key, gchar const *val
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 Inkscape::XML::Node *sp_clippath_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);*/
SPClipPathView *sp_clippath_view_new_prepend(SPClipPathView *list, unsigned int key, NRArenaItem *arenaitem);
SPClipPathView *sp_clippath_view_list_remove(SPClipPathView *list, SPClipPathView *view);
-static SPObjectGroupClass *parent_class;
+//static SPObjectGroupClass *parent_class;
+SPObjectGroupClass * SPClipPathClass::static_parent_class = 0;
GType
-sp_clippath_get_type(void)
+SPClipPath::sp_clippath_get_type(void)
{
static GType type = 0;
if (!type) {
GTypeInfo info = {
sizeof(SPClipPathClass),
NULL, NULL,
- (GClassInitFunc) sp_clippath_class_init,
+ (GClassInitFunc) SPClipPathClass::sp_clippath_class_init,
NULL, NULL,
sizeof(SPClipPath),
16,
return type;
}
-static void
-sp_clippath_class_init(SPClipPathClass *klass)
+void
+SPClipPathClass::sp_clippath_class_init(SPClipPathClass *klass)
{
SPObjectClass *sp_object_class = (SPObjectClass *) klass;
- parent_class = (SPObjectGroupClass*)g_type_class_ref(SP_TYPE_OBJECTGROUP);
+ static_parent_class = (SPObjectGroupClass*)g_type_class_ref(SP_TYPE_OBJECTGROUP);
- sp_object_class->build = sp_clippath_build;
- sp_object_class->release = sp_clippath_release;
- sp_object_class->set = sp_clippath_set;
- sp_object_class->child_added = sp_clippath_child_added;
- sp_object_class->update = sp_clippath_update;
- sp_object_class->modified = sp_clippath_modified;
- sp_object_class->write = sp_clippath_write;
+ sp_object_class->build = SPClipPath::sp_clippath_build;
+ sp_object_class->release = SPClipPath::sp_clippath_release;
+ sp_object_class->set = SPClipPath::sp_clippath_set;
+ sp_object_class->child_added = SPClipPath::sp_clippath_child_added;
+ sp_object_class->update = SPClipPath::sp_clippath_update;
+ sp_object_class->modified = SPClipPath::sp_clippath_modified;
+ sp_object_class->write = SPClipPath::sp_clippath_write;
}
-static void
-sp_clippath_init(SPClipPath *cp)
+void
+SPClipPath::sp_clippath_init(SPClipPath *cp)
{
cp->clipPathUnits_set = FALSE;
cp->clipPathUnits = SP_CONTENT_UNITS_USERSPACEONUSE;
cp->display = NULL;
}
-static void
-sp_clippath_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
+void
+SPClipPath::sp_clippath_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
- if (((SPObjectClass *) parent_class)->build)
- ((SPObjectClass *) parent_class)->build(object, document, repr);
+ if (((SPObjectClass *) SPClipPathClass::static_parent_class)->build)
+ ((SPObjectClass *) SPClipPathClass::static_parent_class)->build(object, document, repr);
object->readAttr( "clipPathUnits");
@@ -110,8 +111,8 @@ sp_clippath_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *r
document->add_resource("clipPath", object);
}
-static void
-sp_clippath_release(SPObject * object)
+void
+SPClipPath::sp_clippath_release(SPObject * object)
{
if (SP_OBJECT_DOCUMENT(object)) {
/* Unregister ourselves */
cp->display = sp_clippath_view_list_remove(cp->display, cp->display);
}
- if (((SPObjectClass *) (parent_class))->release) {
- ((SPObjectClass *) parent_class)->release(object);
+ if (((SPObjectClass *) (SPClipPathClass::static_parent_class))->release) {
+ ((SPObjectClass *) SPClipPathClass::static_parent_class)->release(object);
}
}
-static void
-sp_clippath_set(SPObject *object, unsigned int key, gchar const *value)
+void
+SPClipPath::sp_clippath_set(SPObject *object, unsigned int key, gchar const *value)
{
SPClipPath *cp = SP_CLIPPATH(object);
object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
break;
default:
- if (((SPObjectClass *) parent_class)->set)
- ((SPObjectClass *) parent_class)->set(object, key, value);
+ if (((SPObjectClass *) SPClipPathClass::static_parent_class)->set)
+ ((SPObjectClass *) SPClipPathClass::static_parent_class)->set(object, key, value);
break;
}
}
-static void
-sp_clippath_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
+void
+SPClipPath::sp_clippath_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
{
/* Invoke SPObjectGroup implementation */
- ((SPObjectClass *) (parent_class))->child_added(object, child, ref);
+ ((SPObjectClass *) (SPClipPathClass::static_parent_class))->child_added(object, child, ref);
/* Show new object */
SPObject *ochild = SP_OBJECT_DOCUMENT(object)->getObjectByRepr(child);
@@ -176,8 +177,8 @@ sp_clippath_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::
}
}
-static void
-sp_clippath_update(SPObject *object, SPCtx *ctx, guint flags)
+void
+SPClipPath::sp_clippath_update(SPObject *object, SPCtx *ctx, guint flags)
{
if (flags & SP_OBJECT_MODIFIED_FLAG) {
flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
}
-static void
-sp_clippath_modified(SPObject *object, guint flags)
+void
+SPClipPath::sp_clippath_modified(SPObject *object, guint flags)
{
if (flags & SP_OBJECT_MODIFIED_FLAG) {
flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
}
}
-static Inkscape::XML::Node *
-sp_clippath_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
+Inkscape::XML::Node *
+SPClipPath::sp_clippath_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
{
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
repr = xml_doc->createElement("svg:clipPath");
}
- if (((SPObjectClass *) (parent_class))->write)
- ((SPObjectClass *) (parent_class))->write(object, xml_doc, repr, flags);
+ if (((SPObjectClass *) (SPClipPathClass::static_parent_class))->write)
+ ((SPObjectClass *) (SPClipPathClass::static_parent_class))->write(object, xml_doc, repr, flags);
return repr;
}
NRArenaItem *
-sp_clippath_show(SPClipPath *cp, NRArena *arena, unsigned int key)
+SPClipPath::sp_clippath_show(NRArena *arena, unsigned int key)
{
- g_return_val_if_fail(cp != NULL, NULL);
- g_return_val_if_fail(SP_IS_CLIPPATH(cp), NULL);
+ //g_return_val_if_fail(cp != NULL, NULL);
+ //g_return_val_if_fail(SP_IS_CLIPPATH(cp), NULL);
g_return_val_if_fail(arena != NULL, NULL);
g_return_val_if_fail(NR_IS_ARENA(arena), NULL);
NRArenaItem *ai = NRArenaGroup::create(arena);
- cp->display = sp_clippath_view_new_prepend(cp->display, key, ai);
+ this->display = sp_clippath_view_new_prepend(this->display, key, ai);
- for (SPObject *child = SP_OBJECT(cp)->first_child() ; child != NULL; child = SP_OBJECT_NEXT(child)) {
+ for (SPObject *child = this->first_child() ; child != NULL; child = SP_OBJECT_NEXT(child)) {
if (SP_IS_ITEM(child)) {
NRArenaItem *ac = SP_ITEM(child)->invoke_show(arena, key, SP_ITEM_REFERENCE_FLAGS);
if (ac) {
}
}
- if (cp->clipPathUnits == SP_CONTENT_UNITS_OBJECTBOUNDINGBOX) {
- Geom::Matrix t(Geom::Scale(cp->display->bbox.x1 - cp->display->bbox.x0, cp->display->bbox.y1 - cp->display->bbox.y0));
- t[4] = cp->display->bbox.x0;
- t[5] = cp->display->bbox.y0;
+ if (this->clipPathUnits == SP_CONTENT_UNITS_OBJECTBOUNDINGBOX) {
+ Geom::Matrix t(Geom::Scale(this->display->bbox.x1 - this->display->bbox.x0, this->display->bbox.y1 - this->display->bbox.y0));
+ t[4] = this->display->bbox.x0;
+ t[5] = this->display->bbox.y0;
nr_arena_group_set_child_transform(NR_ARENA_GROUP(ai), &t);
}
}
void
-sp_clippath_hide(SPClipPath *cp, unsigned int key)
+SPClipPath::sp_clippath_hide(unsigned int key)
{
- g_return_if_fail(cp != NULL);
- g_return_if_fail(SP_IS_CLIPPATH(cp));
+ //g_return_if_fail(cp != NULL);
+ //g_return_if_fail(SP_IS_CLIPPATH(cp));
- for (SPObject *child = SP_OBJECT(cp)->first_child() ; child != NULL; child = SP_OBJECT_NEXT(child)) {
+ for (SPObject *child = this->first_child() ; child != NULL; child = SP_OBJECT_NEXT(child)) {
if (SP_IS_ITEM(child)) {
SP_ITEM(child)->invoke_hide(key);
}
}
- for (SPClipPathView *v = cp->display; v != NULL; v = v->next) {
+ for (SPClipPathView *v = this->display; v != NULL; v = v->next) {
if (v->key == key) {
/* We simply unref and let item to manage this in handler */
- cp->display = sp_clippath_view_list_remove(cp->display, v);
+ this->display = sp_clippath_view_list_remove(this->display, v);
return;
}
}
}
void
-sp_clippath_set_bbox(SPClipPath *cp, unsigned int key, NRRect *bbox)
+SPClipPath::sp_clippath_set_bbox(unsigned int key, NRRect *bbox)
{
- for (SPClipPathView *v = cp->display; v != NULL; v = v->next) {
+ for (SPClipPathView *v = this->display; v != NULL; v = v->next) {
if (v->key == key) {
if (!NR_DF_TEST_CLOSE(v->bbox.x0, bbox->x0, NR_EPSILON) ||
!NR_DF_TEST_CLOSE(v->bbox.y0, bbox->y0, NR_EPSILON) ||
}
void
-sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, Geom::Matrix const &transform, unsigned const /*flags*/)
+SPClipPath::sp_clippath_get_bbox(NRRect *bbox, Geom::Matrix const &transform, unsigned const /*flags*/)
{
SPObject *i;
- for (i = SP_OBJECT(cp)->first_child(); i && !SP_IS_ITEM(i); i = SP_OBJECT_NEXT(i)){};
+ for (i = this->first_child(); i && !SP_IS_ITEM(i); i = SP_OBJECT_NEXT(i)){};
if (!i) return;
SP_ITEM(i)->invoke_bbox_full( bbox, Geom::Matrix(SP_ITEM(i)->transform) * transform, SPItem::GEOMETRIC_BBOX, FALSE);
// Create a mask element (using passed elements), add it to <defs>
const gchar *
-sp_clippath_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform)
+SPClipPath::create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform)
{
Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document));
diff --git a/src/sp-clippath.h b/src/sp-clippath.h
index 308c3c8930e110671ca5d619c2ccc559169f67d9..239dca04957045f80df39bee65465630c481c10f 100644 (file)
--- a/src/sp-clippath.h
+++ b/src/sp-clippath.h
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#define SP_TYPE_CLIPPATH (sp_clippath_get_type ())
+#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))
#include "uri-references.h"
#include "xml/node.h"
-struct SPClipPath : public SPObjectGroup {
+class SPClipPath : public SPObjectGroup {
+ public:
class Reference;
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);
+
+ NRArenaItem *sp_clippath_show(NRArena *arena, unsigned int key);
+ void sp_clippath_hide(unsigned int key);
+
+ 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);
+
+ 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);
+
+ friend class SPClipPathClass;
};
-struct SPClipPathClass {
+class SPClipPathClass {
+ public:
SPObjectGroupClass parent_class;
+ private:
+ static void sp_clippath_class_init(SPClipPathClass *klass);
+ static SPObjectGroupClass *static_parent_class;
+
+ friend class SPClipPath;
};
-GType sp_clippath_get_type (void);
+//GType sp_clippath_get_type (void);
class SPClipPathReference : public Inkscape::URIReference {
public:
}
};
-NRArenaItem *sp_clippath_show(SPClipPath *cp, NRArena *arena, unsigned int key);
+/*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);
+void sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags);*/
-const gchar *sp_clippath_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform);
+//const gchar *sp_clippath_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform);
#endif
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index ae77f9d8420003b4e3920a186883e4538cfaf3eb..fc605516d51ce3be39976d8788373881434ebb86 100644 (file)
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
SPItemView *v;
/* Hide clippath */
for (v = item->display; v != NULL; v = v->next) {
- sp_clippath_hide(SP_CLIPPATH(old_clip), NR_ARENA_ITEM_GET_KEY(v->arenaitem));
+ SP_CLIPPATH(old_clip)->sp_clippath_hide(NR_ARENA_ITEM_GET_KEY(v->arenaitem));
nr_arena_item_set_clip(v->arenaitem, NULL);
}
}
if (!v->arenaitem->key) {
NR_ARENA_ITEM_SET_KEY(v->arenaitem, SPItem::display_key_new(3));
}
- NRArenaItem *ai = sp_clippath_show(SP_CLIPPATH(clip),
+ NRArenaItem *ai = SP_CLIPPATH(clip)->sp_clippath_show(
NR_ARENA_ITEM_ARENA(v->arenaitem),
NR_ARENA_ITEM_GET_KEY(v->arenaitem));
nr_arena_item_set_clip(v->arenaitem, ai);
nr_arena_item_unref(ai);
- sp_clippath_set_bbox(SP_CLIPPATH(clip), NR_ARENA_ITEM_GET_KEY(v->arenaitem), &bbox);
+ SP_CLIPPATH(clip)->sp_clippath_set_bbox(NR_ARENA_ITEM_GET_KEY(v->arenaitem), &bbox);
SP_OBJECT(clip)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
}
item->invoke_bbox( &bbox, Geom::identity(), TRUE);
if (clip_path) {
for (SPItemView *v = item->display; v != NULL; v = v->next) {
- sp_clippath_set_bbox(clip_path, NR_ARENA_ITEM_GET_KEY(v->arenaitem), &bbox);
+ clip_path->sp_clippath_set_bbox(NR_ARENA_ITEM_GET_KEY(v->arenaitem), &bbox);
}
}
if (mask) {
@@ -846,7 +846,7 @@ SPItem::invoke_bbox_full( Geom::OptRect &bbox, Geom::Matrix const &transform, un
}
if (this->clip_ref->getObject()) {
NRRect b;
- sp_clippath_get_bbox(SP_CLIPPATH(this->clip_ref->getObject()), &b, transform, flags);
+ SP_CLIPPATH(this->clip_ref->getObject())->sp_clippath_get_bbox(&b, transform, flags);
nr_rect_d_intersect (&temp_bbox, &temp_bbox, &b);
}
}
// unless this is geometric bbox, crop the bbox by clip path, if any
if ((SPItem::BBoxType) flags != SPItem::GEOMETRIC_BBOX && this->clip_ref->getObject()) {
NRRect b;
- sp_clippath_get_bbox(SP_CLIPPATH(this->clip_ref->getObject()), &b, transform, flags);
+ SP_CLIPPATH(this->clip_ref->getObject())->sp_clippath_get_bbox(&b, transform, flags);
nr_rect_d_intersect (&this_bbox, &this_bbox, &b);
}
int clip_key = NR_ARENA_ITEM_GET_KEY(display->arenaitem);
// Show and set clip
- NRArenaItem *ac = sp_clippath_show(cp, arena, clip_key);
+ NRArenaItem *ac = cp->sp_clippath_show(arena, clip_key);
nr_arena_item_set_clip(ai, ac);
nr_arena_item_unref(ac);
// Update bbox, in case the clip uses bbox units
NRRect bbox;
invoke_bbox( &bbox, Geom::identity(), TRUE);
- sp_clippath_set_bbox(SP_CLIPPATH(cp), clip_key, &bbox);
+ SP_CLIPPATH(cp)->sp_clippath_set_bbox(clip_key, &bbox);
SP_OBJECT(cp)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
if (mask_ref->getObject()) {
SPItemView *next = v->next;
if (v->key == key) {
if (clip_ref->getObject()) {
- sp_clippath_hide(clip_ref->getObject(), NR_ARENA_ITEM_GET_KEY(v->arenaitem));
+ (clip_ref->getObject())->sp_clippath_hide(NR_ARENA_ITEM_GET_KEY(v->arenaitem));
nr_arena_item_set_clip(v->arenaitem, NULL);
}
if (mask_ref->getObject()) {