summaryrefslogtreecommitdiffstats
path: root/src/extension
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-08-08 17:32:43 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-08-08 17:32:43 +0000
commit43dc21b53e642208542398d7d257d0f9cb48582f (patch)
tree75510653a1989316dad1df9b3d9bc9230264281c /src/extension
parentFixed svg-path (and display/curve) tests to properly handle closepath and mad... (diff)
downloadinkscape-43dc21b53e642208542398d7d257d0f9cb48582f.tar.gz
inkscape-43dc21b53e642208542398d7d257d0f9cb48582f.zip
remove many unnecessary to_2geom and from_2geom calls
(bzr r6593)
Diffstat (limited to 'src/extension')
-rw-r--r--src/extension/internal/cairo-renderer.cpp16
-rw-r--r--src/extension/internal/emf-win32-print.cpp2
-rw-r--r--src/extension/internal/latex-pstricks.cpp2
-rw-r--r--src/extension/internal/odf.cpp4
-rw-r--r--src/extension/internal/pdf-cairo.cpp4
-rw-r--r--src/extension/internal/ps.cpp2
6 files changed, 15 insertions, 15 deletions
diff --git a/src/extension/internal/cairo-renderer.cpp b/src/extension/internal/cairo-renderer.cpp
index 48fe3bec2..3a4748b8a 100644
--- a/src/extension/internal/cairo-renderer.cpp
+++ b/src/extension/internal/cairo-renderer.cpp
@@ -190,7 +190,7 @@ static void sp_shape_render (SPItem *item, CairoRenderContext *ctx)
SPMarker* marker = SP_MARKER (shape->marker[SP_MARKER_LOC_START]);
SPItem* marker_item = sp_item_first_item_child (SP_OBJECT (shape->marker[SP_MARKER_LOC_START]));
- NR::Matrix tr(from_2geom(sp_shape_marker_get_transform_at_start(path_it->front())));
+ NR::Matrix tr(sp_shape_marker_get_transform_at_start(path_it->front()));
if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH) {
tr = NR::scale(style->stroke_width.computed) * tr;
@@ -216,7 +216,7 @@ static void sp_shape_render (SPItem *item, CairoRenderContext *ctx)
SPMarker* marker = SP_MARKER (shape->marker[SP_MARKER_LOC_MID]);
SPItem* marker_item = sp_item_first_item_child (SP_OBJECT (shape->marker[SP_MARKER_LOC_MID]));
- NR::Matrix tr(from_2geom(sp_shape_marker_get_transform(*curve_it1, *curve_it2)));
+ NR::Matrix tr(sp_shape_marker_get_transform(*curve_it1, *curve_it2));
if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH) {
tr = NR::scale(style->stroke_width.computed) * tr;
@@ -238,7 +238,7 @@ static void sp_shape_render (SPItem *item, CairoRenderContext *ctx)
SPMarker* marker = SP_MARKER (shape->marker[SP_MARKER_LOC_END]);
SPItem* marker_item = sp_item_first_item_child (SP_OBJECT (shape->marker[SP_MARKER_LOC_END]));
- NR::Matrix tr(from_2geom(sp_shape_marker_get_transform_at_end(path_it->back_default())));
+ NR::Matrix tr(sp_shape_marker_get_transform_at_end(path_it->back_default()));
if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH) {
tr = NR::scale(style->stroke_width.computed) * tr;
@@ -409,9 +409,9 @@ static void sp_asbitmap_render(SPItem *item, CairoRenderContext *ctx)
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
// Get the bounding box of the selection
- //boost::optional<NR::Rect> _bbox = item->getBounds(from_2geom(sp_item_i2d_affine(item)));
- // NRRect bbox = item->getBounds(from_2geom(sp_item_i2d_affine(item)));
- NRRect bbox(item->getBounds(from_2geom(sp_item_i2d_affine(item))));
+ //boost::optional<NR::Rect> _bbox = item->getBounds(sp_item_i2d_affine(item));
+ // NRRect bbox = item->getBounds(sp_item_i2d_affine(item));
+ NRRect bbox(item->getBounds(sp_item_i2d_affine(item)));
// List of the items to show; all others will be hidden
@@ -464,7 +464,7 @@ static void sp_asbitmap_render(SPItem *item, CairoRenderContext *ctx)
}
*/
// Calculate the matrix that will be applied to the image so that it exactly overlaps the source objects
- NR::Matrix eek = from_2geom(sp_item_i2d_affine (SP_ITEM(parent_object)));
+ NR::Matrix eek = sp_item_i2d_affine (SP_ITEM(parent_object));
NR::Matrix t;
double shift_x = bbox.x0;
@@ -632,7 +632,7 @@ CairoRenderer::setupDocument(CairoRenderContext *ctx, SPDocument *doc)
d.y1 = ceil(ctx->_height);
} else {
SPItem* doc_item = SP_ITEM(sp_document_root(doc));
- sp_item_invoke_bbox(doc_item, &d, from_2geom(sp_item_i2r_affine(doc_item)), TRUE);
+ sp_item_invoke_bbox(doc_item, &d, sp_item_i2r_affine(doc_item), TRUE);
if (ctx->_vector_based_target) {
// convert from px to pt
d.x0 *= PT_PER_PX;
diff --git a/src/extension/internal/emf-win32-print.cpp b/src/extension/internal/emf-win32-print.cpp
index 69277440f..6e0a7bf0b 100644
--- a/src/extension/internal/emf-win32-print.cpp
+++ b/src/extension/internal/emf-win32-print.cpp
@@ -156,7 +156,7 @@ PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc)
d.y1 = _height;
} else {
SPItem* doc_item = SP_ITEM(sp_document_root(doc));
- sp_item_invoke_bbox(doc_item, &d, from_2geom(sp_item_i2r_affine(doc_item)), TRUE);
+ sp_item_invoke_bbox(doc_item, &d, sp_item_i2r_affine(doc_item), TRUE);
}
d.x0 *= IN_PER_PX;
diff --git a/src/extension/internal/latex-pstricks.cpp b/src/extension/internal/latex-pstricks.cpp
index c1dcec361..eeda6f187 100644
--- a/src/extension/internal/latex-pstricks.cpp
+++ b/src/extension/internal/latex-pstricks.cpp
@@ -281,7 +281,7 @@ PrintLatex::print_pathvector(SVGOStringStream &os, Geom::PathVector const &pathv
// NR::Matrix tf=*transform; // why was this here?
NR::Matrix tf_stack=m_tr_stack.top(); // and why is transform argument not used?
- Geom::PathVector pathv = pathv_in * to_2geom(tf_stack); // generates new path, which is a bit slow, but this doesn't have to be performance optimized
+ Geom::PathVector pathv = pathv_in * tf_stack; // generates new path, which is a bit slow, but this doesn't have to be performance optimized
os << "\\newpath\n";
diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp
index 959070b50..8ad9b5031 100644
--- a/src/extension/internal/odf.cpp
+++ b/src/extension/internal/odf.cpp
@@ -945,7 +945,7 @@ static Glib::ustring formatTransform(NR::Matrix &tf)
static NR::Matrix getODFTransform(const SPItem *item)
{
//### Get SVG-to-ODF transform
- NR::Matrix tf = from_2geom(sp_item_i2d_affine(item));
+ NR::Matrix tf (sp_item_i2d_affine(item));
//Flip Y into document coordinates
double doc_height = sp_document_height(SP_ACTIVE_DOCUMENT);
NR::Matrix doc2dt_tf = NR::Matrix(NR::scale(1.0, -1.0));
@@ -2041,7 +2041,7 @@ bool OdfOutput::writeTree(Writer &couts, Writer &souts,
couts.printf(" svg:d=\"");
int nrPoints = writePath(couts, curve->get_pathvector(),
- to_2geom(tf), bbox_x, bbox_y);
+ tf, bbox_x, bbox_y);
couts.printf("\"");
couts.printf(">\n");
diff --git a/src/extension/internal/pdf-cairo.cpp b/src/extension/internal/pdf-cairo.cpp
index 0ff571275..2b3c93824 100644
--- a/src/extension/internal/pdf-cairo.cpp
+++ b/src/extension/internal/pdf-cairo.cpp
@@ -334,7 +334,7 @@ PrintCairoPDF::begin(Inkscape::Extension::Print *mod, SPDocument *doc)
d.y1 = _height;
} else {
// if not page, use our base, which is either root or the item we want to export
- sp_item_invoke_bbox(doc_item, &d, from_2geom(sp_item_i2doc_affine (doc_item)), TRUE);
+ sp_item_invoke_bbox(doc_item, &d, sp_item_i2doc_affine (doc_item), TRUE);
// convert from px to pt
d.x0 *= PT_PER_PX;
d.x1 *= PT_PER_PX;
@@ -348,7 +348,7 @@ PrintCairoPDF::begin(Inkscape::Extension::Print *mod, SPDocument *doc)
// object itself, ignoring its ancestors
// complete transform, including doc_item's own transform
- t = from_2geom(sp_item_i2doc_affine (doc_item));
+ t = sp_item_i2doc_affine (doc_item);
// subreact doc_item's transform (comes first) from it
t = NR::Matrix(doc_item->transform).inverse() * t;
diff --git a/src/extension/internal/ps.cpp b/src/extension/internal/ps.cpp
index 6f1405de2..15b0bd8f4 100644
--- a/src/extension/internal/ps.cpp
+++ b/src/extension/internal/ps.cpp
@@ -412,7 +412,7 @@ PrintPS::begin(Inkscape::Extension::Print *mod, SPDocument *doc)
d.y1 = ceil(_height);
} else {
SPItem* doc_item = SP_ITEM(sp_document_root(doc));
- sp_item_invoke_bbox(doc_item, &d, from_2geom(sp_item_i2r_affine(doc_item)), TRUE);
+ sp_item_invoke_bbox(doc_item, &d, sp_item_i2r_affine(doc_item), TRUE);
// convert from px to pt
d.x0 *= PT_PER_PX;
d.x1 *= PT_PER_PX;