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/selection.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/selection.cpp')
| -rw-r--r-- | src/selection.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/selection.cpp b/src/selection.cpp index 96c66e0c5..acf6a8e6e 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -374,7 +374,7 @@ Geom::OptRect Selection::bounds(SPItem::BBoxType type) const Geom::OptRect bbox; for ( GSList const *i = items ; i != NULL ; i = i->next ) { - bbox = unify(bbox, sp_item_bbox_desktop(SP_ITEM(i->data), type)); + bbox = unify(bbox, SP_ITEM(i->data)->getBboxDesktop(type)); } return bbox; } @@ -393,8 +393,8 @@ NRRect *Selection::boundsInDocument(NRRect *bbox, SPItem::BBoxType type) const { for ( GSList const *iter=items ; iter != NULL ; iter = iter->next ) { SPItem *item=SP_ITEM(iter->data); - Geom::Matrix i2doc(sp_item_i2doc_affine(item)); - sp_item_invoke_bbox(item, bbox, i2doc, FALSE, type); + Geom::Matrix i2doc(item->i2doc_affine()); + item->invoke_bbox( bbox, i2doc, FALSE, type); } return bbox; @@ -436,7 +436,7 @@ std::vector<Inkscape::SnapCandidatePoint> Selection::getSnapPoints(SnapPreferenc std::vector<Inkscape::SnapCandidatePoint> p; for (GSList const *iter = items; iter != NULL; iter = iter->next) { SPItem *this_item = SP_ITEM(iter->data); - sp_item_snappoints(this_item, p, &snapprefs_dummy); + this_item->getSnappoints(p, &snapprefs_dummy); //Include the transformation origin for snapping //For a selection or group only the overall origin is considered @@ -458,7 +458,7 @@ std::vector<Inkscape::SnapCandidatePoint> Selection::getSnapPointsConvexHull(Sna std::vector<Inkscape::SnapCandidatePoint> p; for (GSList const *iter = items; iter != NULL; iter = iter->next) { - sp_item_snappoints(SP_ITEM(iter->data), p, &snapprefs_dummy); + SP_ITEM(iter->data)->getSnappoints(p, &snapprefs_dummy); } std::vector<Inkscape::SnapCandidatePoint> pHull; |
