Code

r11516@tres: ted | 2006-04-26 21:30:18 -0700
[inkscape.git] / src / sp-item-group.cpp
index cd11b3c41be974c2e4e3ae95da4a2855e9debbb5..b5f6881b72e73909f6f9e2f3ba4b755b08bb4585 100644 (file)
@@ -29,6 +29,7 @@
 #include "document.h"
 #include "style.h"
 #include "attributes.h"
+#include "sp-item-transform.h"
 
 #include "sp-root.h"
 #include "sp-use.h"
@@ -524,6 +525,19 @@ void SPGroup::_updateLayerMode(unsigned int display_key) {
        }
 }
 
+void SPGroup::translateChildItems(NR::translate const &tr)
+{
+       if (this->hasChildren())
+       {
+               SPObject *o = NULL;
+               for (o = sp_object_first_child(SP_OBJECT(this)) ; o != NULL ; o = SP_OBJECT_NEXT(o) ) {
+                       if (SP_IS_ITEM (o)) {
+                               sp_item_move_rel(static_cast<SPItem *>(o), tr);
+                       }
+               }
+       }
+}
+
 CGroup::CGroup(SPGroup *group) {
     _group = group;
 }