summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpeobject.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-12-15 16:19:28 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-12-15 16:19:28 +0000
commit70201e92aa1e700d49279871f2b84082750b8ed8 (patch)
tree1886fcdf8ad20d73b92bf4f4bfd3ab1406ba4c66 /src/live_effects/lpeobject.cpp
parentFix mask luminance calculation, so the coeffs add up to 1 (diff)
parentWin32 post-GSoC fixups. (diff)
downloadinkscape-70201e92aa1e700d49279871f2b84082750b8ed8.tar.gz
inkscape-70201e92aa1e700d49279871f2b84082750b8ed8.zip
Merge from trunk (again)
(bzr r9508.1.72)
Diffstat (limited to 'src/live_effects/lpeobject.cpp')
-rw-r--r--src/live_effects/lpeobject.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/live_effects/lpeobject.cpp b/src/live_effects/lpeobject.cpp
index aa916318d..389e18d20 100644
--- a/src/live_effects/lpeobject.cpp
+++ b/src/live_effects/lpeobject.cpp
@@ -1,7 +1,6 @@
-#define INKSCAPE_LIVEPATHEFFECT_OBJECT_CPP
-
/*
* Copyright (C) Johan Engelen 2007-2008 <j.b.c.engelen@utwente.nl>
+ * Abhishek Sharma
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
@@ -104,14 +103,14 @@ LivePathEffectObject::livepatheffect_build(SPObject *object, SPDocument *documen
if (((SPObjectClass *) livepatheffect_parent_class)->build)
(* ((SPObjectClass *) livepatheffect_parent_class)->build)(object, document, repr);
- sp_object_read_attr(object, "effect");
+ object->readAttr( "effect" );
if (repr) {
repr->addListener (&livepatheffect_repr_events, object);
}
/* Register ourselves, is this necessary? */
-// sp_document_add_resource(document, "path-effect", object);
+// document->addResource("path-effect", object);
}
/**
@@ -132,7 +131,7 @@ LivePathEffectObject::livepatheffect_release(SPObject *object)
/*
if (SP_OBJECT_DOCUMENT(object)) {
// Unregister ourselves
- sp_document_remove_resource(SP_OBJECT_DOCUMENT(object), "livepatheffect", SP_OBJECT(object));
+ sp_document_removeResource(SP_OBJECT_DOCUMENT(object), "livepatheffect", SP_OBJECT(object));
}
if (gradient->ref) {
@@ -247,12 +246,11 @@ livepatheffect_on_repr_attr_changed ( Inkscape::XML::Node * /*repr*/,
* returns 'this' when no forking was necessary (and therefore no duplicate was made)
* Check out sp_lpe_item_fork_path_effects_if_necessary !
*/
-LivePathEffectObject *
-LivePathEffectObject::fork_private_if_necessary(unsigned int nr_of_allowed_users)
+LivePathEffectObject *LivePathEffectObject::fork_private_if_necessary(unsigned int nr_of_allowed_users)
{
- if (SP_OBJECT_HREFCOUNT(this) > nr_of_allowed_users) {
+ if (hrefcount > nr_of_allowed_users) {
SPDocument *doc = SP_OBJECT_DOCUMENT(this);
- Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
+ Inkscape::XML::Document *xml_doc = doc->getReprDoc();
Inkscape::XML::Node *dup_repr = SP_OBJECT_REPR (this)->duplicate(xml_doc);
SP_OBJECT_REPR (SP_DOCUMENT_DEFS (doc))->addChild(dup_repr, NULL);