diff options
| author | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-06-29 18:05:42 +0000 |
|---|---|---|
| committer | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-06-29 18:05:42 +0000 |
| commit | 8867de5daf309e4cdd3fce177b408618490be4f3 (patch) | |
| tree | 19a528d472e7a63f9cab97daa5c979d977db821b /src/unclump.cpp | |
| parent | minor fix in Dutch translation of win32 installer (diff) | |
| download | inkscape-8867de5daf309e4cdd3fce177b408618490be4f3.tar.gz inkscape-8867de5daf309e4cdd3fce177b408618490be4f3.zip | |
This is the first c++ification commit from me. It handles sp-line, sp-polyline, sp-item and marks the onset of document c++ification as well. Users can check performace increase with [/usr/bin/time -v inkscape_binary_with_commandline_options].
(bzr r9546.1.1)
Diffstat (limited to 'src/unclump.cpp')
| -rw-r--r-- | src/unclump.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/unclump.cpp b/src/unclump.cpp index 85306698c..1d051bc62 100644 --- a/src/unclump.cpp +++ b/src/unclump.cpp @@ -31,7 +31,7 @@ unclump_center (SPItem *item) return i->second; } - Geom::OptRect r = item->getBounds(sp_item_i2d_affine(item)); + Geom::OptRect r = item->getBounds(item->i2d_affine()); if (r) { Geom::Point const c = r->midpoint(); c_cache[item->getId()] = c; @@ -50,7 +50,7 @@ unclump_wh (SPItem *item) if ( i != wh_cache.end() ) { wh = i->second; } else { - Geom::OptRect r = item->getBounds(sp_item_i2d_affine(item)); + Geom::OptRect r = item->getBounds(item->i2d_affine()); if (r) { wh = r->dimensions(); wh_cache[item->getId()] = wh; @@ -294,8 +294,8 @@ unclump_push (SPItem *from, SPItem *what, double dist) //g_print ("push %s at %g,%g from %g,%g by %g,%g, dist %g\n", SP_OBJECT_ID(what), it[Geom::X],it[Geom::Y], p[Geom::X],p[Geom::Y], by[Geom::X],by[Geom::Y], dist); - sp_item_set_i2d_affine(what, sp_item_i2d_affine(what) * move); - sp_item_write_transform(what, SP_OBJECT_REPR(what), what->transform, NULL); + what->set_i2d_affine(what->i2d_affine() * move); + what->doWriteTransform(SP_OBJECT_REPR(what), what->transform, NULL); } /** @@ -317,8 +317,8 @@ unclump_pull (SPItem *to, SPItem *what, double dist) //g_print ("pull %s at %g,%g to %g,%g by %g,%g, dist %g\n", SP_OBJECT_ID(what), it[Geom::X],it[Geom::Y], p[Geom::X],p[Geom::Y], by[Geom::X],by[Geom::Y], dist); - sp_item_set_i2d_affine(what, sp_item_i2d_affine(what) * move); - sp_item_write_transform(what, SP_OBJECT_REPR(what), what->transform, NULL); + what->set_i2d_affine(what->i2d_affine() * move); + what->doWriteTransform(SP_OBJECT_REPR(what), what->transform, NULL); } |
