summaryrefslogtreecommitdiffstats
path: root/src/box3d.cpp
diff options
context:
space:
mode:
authorAbhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom>2010-06-29 18:05:42 +0000
committerAbhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom>2010-06-29 18:05:42 +0000
commit8867de5daf309e4cdd3fce177b408618490be4f3 (patch)
tree19a528d472e7a63f9cab97daa5c979d977db821b /src/box3d.cpp
parentminor fix in Dutch translation of win32 installer (diff)
downloadinkscape-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/box3d.cpp')
-rw-r--r--src/box3d.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/box3d.cpp b/src/box3d.cpp
index aa2dc55e3..bdbbbfa7e 100644
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
@@ -355,16 +355,16 @@ box3d_set_transform(SPItem *item, Geom::Matrix const &xform)
SPItem *childitem = SP_ITEM(child);
// Adjust stroke width
- sp_item_adjust_stroke(childitem, sqrt(fabs(sw * sh)));
+ childitem->adjust_stroke(sqrt(fabs(sw * sh)));
// Adjust pattern fill
- sp_item_adjust_pattern(childitem, xform);
+ childitem->adjust_pattern(xform);
// Adjust gradient fill
- sp_item_adjust_gradient(childitem, xform);
+ childitem->adjust_gradient(xform);
// Adjust LPE
- sp_item_adjust_livepatheffect(childitem, xform);
+ childitem->adjust_livepatheffect(xform);
}
}
@@ -393,7 +393,7 @@ box3d_get_corner_screen (SPBox3D const *box, guint id, bool item_coords) {
if (!box3d_get_perspective(box)) {
return Geom::Point (NR_HUGE, NR_HUGE);
}
- Geom::Matrix const i2d (sp_item_i2d_affine (SP_ITEM(box)));
+ Geom::Matrix const i2d (SP_ITEM(box)->i2d_affine ());
if (item_coords) {
return box3d_get_perspective(box)->perspective_impl->tmat.image(proj_corner).affine() * i2d.inverse();
} else {
@@ -417,7 +417,7 @@ box3d_get_center_screen (SPBox3D *box) {
if (!box3d_get_perspective(box)) {
return Geom::Point (NR_HUGE, NR_HUGE);
}
- Geom::Matrix const i2d (sp_item_i2d_affine (SP_ITEM(box)));
+ Geom::Matrix const i2d (SP_ITEM(box)->i2d_affine ());
return box3d_get_perspective(box)->perspective_impl->tmat.image(proj_center).affine() * i2d.inverse();
}
@@ -1392,7 +1392,7 @@ box3d_convert_to_guides(SPItem *item) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
if (!prefs->getBool("/tools/shapes/3dbox/convertguides", true)) {
- sp_item_convert_to_guides(SP_ITEM(box));
+ SP_ITEM(box)->convert_to_guides();
return;
}