diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-08-04 21:08:41 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-08-04 21:08:41 +0000 |
| commit | 57a6fee4d17b6049b95ccf2ef445ed18c8a2a841 (patch) | |
| tree | f0696d1a5929d1de9e2412ae89dd86c49e8ae6c7 /src | |
| parent | Wholesale cruft removal part 1 (diff) | |
| download | inkscape-57a6fee4d17b6049b95ccf2ef445ed18c8a2a841.tar.gz inkscape-57a6fee4d17b6049b95ccf2ef445ed18c8a2a841.zip | |
Wholesale cruft removal part 2
(bzr r9508.1.45)
Diffstat (limited to 'src')
| -rw-r--r-- | src/filter-chemistry.cpp | 1 | ||||
| -rw-r--r-- | src/gradient-chemistry.cpp | 4 | ||||
| -rw-r--r-- | src/knot-holder-entity.cpp | 1 | ||||
| -rw-r--r-- | src/libnrtype/Layout-TNG-Output.cpp | 5 | ||||
| -rw-r--r-- | src/libnrtype/Layout-TNG.h | 2 | ||||
| -rw-r--r-- | src/livarot/Path.cpp | 1 | ||||
| -rw-r--r-- | src/livarot/ShapeMisc.cpp | 4 | ||||
| -rw-r--r-- | src/sp-clippath.cpp | 1 | ||||
| -rw-r--r-- | src/sp-conn-end.cpp | 1 | ||||
| -rw-r--r-- | src/sp-ellipse.cpp | 2 | ||||
| -rw-r--r-- | src/sp-flowdiv.cpp | 1 | ||||
| -rw-r--r-- | src/sp-gradient.cpp | 3 | ||||
| -rw-r--r-- | src/sp-image.cpp | 19 | ||||
| -rw-r--r-- | src/sp-item-group.cpp | 2 | ||||
| -rw-r--r-- | src/sp-line.cpp | 5 | ||||
| -rw-r--r-- | src/sp-mask.cpp | 1 | ||||
| -rw-r--r-- | src/sp-offset.cpp | 2 | ||||
| -rw-r--r-- | src/sp-path.cpp | 3 | ||||
| -rw-r--r-- | src/sp-pattern.cpp | 6 | ||||
| -rw-r--r-- | src/sp-rect.cpp | 4 | ||||
| -rw-r--r-- | src/sp-symbol.cpp | 2 | ||||
| -rw-r--r-- | src/sp-text.cpp | 1 | ||||
| -rw-r--r-- | src/sp-tref.cpp | 1 | ||||
| -rw-r--r-- | src/sp-tspan.cpp | 1 | ||||
| -rw-r--r-- | src/sp-use.cpp | 2 | ||||
| -rw-r--r-- | src/spray-context.cpp | 2 | ||||
| -rw-r--r-- | src/svg/svg-affine.cpp | 3 | ||||
| -rw-r--r-- | src/text-chemistry.cpp | 13 | ||||
| -rw-r--r-- | src/trace/trace.cpp | 27 | ||||
| -rw-r--r-- | src/tweak-context.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/transformation.cpp | 1 |
31 files changed, 34 insertions, 89 deletions
diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp index 298531db0..0361f9276 100644 --- a/src/filter-chemistry.cpp +++ b/src/filter-chemistry.cpp @@ -26,7 +26,6 @@ #include "sp-filter.h" #include "sp-filter-reference.h" #include "svg/css-ostringstream.h" -#include "libnr/nr-matrix-fns.h" #include "xml/repr.h" diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp index c95c1b2c5..88aab0c38 100644 --- a/src/gradient-chemistry.cpp +++ b/src/gradient-chemistry.cpp @@ -29,10 +29,6 @@ #include "sp-text.h" #include "sp-tspan.h" -#include <libnr/nr-matrix-fns.h> -#include <libnr/nr-point-fns.h> -#include <libnr/nr-matrix-ops.h> -#include <libnr/nr-rotate-ops.h> #include <2geom/transforms.h> #include "xml/repr.h" #include "svg/svg.h" diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp index 2d0d5eb02..71d2c8235 100644 --- a/src/knot-holder-entity.cpp +++ b/src/knot-holder-entity.cpp @@ -21,7 +21,6 @@ #include "style.h" #include "preferences.h" #include "macros.h" -#include <libnr/nr-matrix-ops.h> #include "sp-pattern.h" #include "snap.h" #include "desktop.h" diff --git a/src/libnrtype/Layout-TNG-Output.cpp b/src/libnrtype/Layout-TNG-Output.cpp index f34b93d6e..836b86939 100644 --- a/src/libnrtype/Layout-TNG-Output.cpp +++ b/src/libnrtype/Layout-TNG-Output.cpp @@ -15,9 +15,6 @@ #include "print.h" #include "extension/print.h" #include "livarot/Path.h" -#include "libnr/nr-matrix-fns.h" -#include "libnr/nr-scale-matrix-ops.h" -#include "libnr/nr-convert2geom.h" #include "font-instance.h" #include "svg/svg-length.h" #include "extension/internal/cairo-render-context.h" @@ -288,7 +285,7 @@ void Layout::showGlyphs(CairoRenderContext *ctx) const } } while (glyph_index < _glyphs.size() && _path_fitted == NULL - && NR::transform_equalp(font_matrix, glyph_matrix, NR_EPSILON) + && (font_matrix * glyph_matrix.inverse()).isIdentity() && _characters[_glyphs[glyph_index].in_character].in_span == this_span_index); // remove vertical flip diff --git a/src/libnrtype/Layout-TNG.h b/src/libnrtype/Layout-TNG.h index 0a2463a56..1f82aab97 100644 --- a/src/libnrtype/Layout-TNG.h +++ b/src/libnrtype/Layout-TNG.h @@ -14,8 +14,6 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include <libnr/nr-matrix-ops.h> -#include <libnr/nr-rotate-ops.h> #include <libnr/nr-rect.h> #include <2geom/d2.h> #include <2geom/matrix.h> diff --git a/src/livarot/Path.cpp b/src/livarot/Path.cpp index 66ec87274..2a1851cfe 100644 --- a/src/livarot/Path.cpp +++ b/src/livarot/Path.cpp @@ -9,7 +9,6 @@ #include <glib.h> #include "Path.h" #include "livarot/path-description.h" -#include <libnr/nr-matrix-ops.h> /* * manipulation of the path data: path description and polyline diff --git a/src/livarot/ShapeMisc.cpp b/src/livarot/ShapeMisc.cpp index d6ca8c533..a82da4c8a 100644 --- a/src/livarot/ShapeMisc.cpp +++ b/src/livarot/ShapeMisc.cpp @@ -7,14 +7,14 @@ */ #include "livarot/Shape.h" -#include <libnr/nr-matrix-fns.h> -#include <libnr/nr-point-fns.h> #include "livarot/Path.h" #include "livarot/path-description.h" #include <glib.h> #include <cstdio> #include <cstdlib> #include <cstring> +#include <2geom/point.h> +#include <2geom/matrix.h> /* * polygon offset and polyline to path reassembling (when using back data) diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index 4bbabc965..2d42f37f4 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -25,7 +25,6 @@ #include "document-private.h" #include "sp-item.h" -#include "libnr/nr-matrix-ops.h" #include <2geom/transforms.h> #include "sp-clippath.h" diff --git a/src/sp-conn-end.cpp b/src/sp-conn-end.cpp index 3ad6954a2..33ef98b76 100644 --- a/src/sp-conn-end.cpp +++ b/src/sp-conn-end.cpp @@ -4,7 +4,6 @@ #include <limits> #include "display/curve.h" -#include "libnr/nr-matrix-fns.h" #include "xml/repr.h" #include "sp-conn-end.h" #include "sp-path.h" diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 88fc59f17..100be187a 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -18,8 +18,6 @@ # include "config.h" #endif - -#include "libnr/nr-matrix-fns.h" #include "svg/svg.h" #include "svg/path-string.h" #include "xml/repr.h" diff --git a/src/sp-flowdiv.cpp b/src/sp-flowdiv.cpp index 6d679701f..1b0a395e0 100644 --- a/src/sp-flowdiv.cpp +++ b/src/sp-flowdiv.cpp @@ -7,7 +7,6 @@ # include "config.h" #endif -#include "libnr/nr-matrix-ops.h" #include "xml/repr.h" //#include "svg/svg.h" diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp index 982ce0d0e..1b168c5e6 100644 --- a/src/sp-gradient.cpp +++ b/src/sp-gradient.cpp @@ -23,9 +23,6 @@ #include <cstring> #include <string> -#include <libnr/nr-matrix-fns.h> -#include <libnr/nr-matrix-ops.h> -#include <libnr/nr-matrix-scale-ops.h> #include <2geom/transforms.h> #include <sigc++/functors/ptr_fun.h> diff --git a/src/sp-image.cpp b/src/sp-image.cpp index b383512f5..596090846 100644 --- a/src/sp-image.cpp +++ b/src/sp-image.cpp @@ -21,32 +21,23 @@ #include <cstring> #include <algorithm> #include <string> -#include <libnr/nr-matrix-fns.h> -#include <libnr/nr-matrix-ops.h> -#include <libnr/nr-translate-matrix-ops.h> -#include <libnr/nr-scale-translate-ops.h> -#include <libnr/nr-convert2geom.h> -#include <2geom/rect.h> -//#define GDK_PIXBUF_ENABLE_BACKEND 1 -//#include <gdk-pixbuf/gdk-pixbuf-io.h> -#include "display/nr-arena-image.h" -#include <display/curve.h> #include <glib/gstdio.h> +#include <2geom/rect.h> +#include <glibmm/i18n.h> +#include "display/nr-arena-image.h" +#include "display/curve.h" //Added for preserveAspectRatio support -- EAF #include "enums.h" #include "attributes.h" - #include "print.h" #include "brokenimage.xpm" #include "document.h" #include "sp-image.h" #include "sp-clippath.h" -#include <glibmm/i18n.h> #include "xml/quote.h" -#include <xml/repr.h> +#include "xml/repr.h" #include "snap-candidate.h" -#include "libnr/nr-matrix-fns.h" #include "io/sys.h" #if ENABLE_LCMS diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index 588427752..67a0c8b63 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -24,8 +24,6 @@ #include "display/nr-arena-group.h" #include "display/curve.h" -#include "libnr/nr-matrix-ops.h" -#include "libnr/nr-matrix-fns.h" #include "xml/repr.h" #include "svg/svg.h" #include "document.h" diff --git a/src/sp-line.cpp b/src/sp-line.cpp index d0ce32397..f489da2f1 100644 --- a/src/sp-line.cpp +++ b/src/sp-line.cpp @@ -12,7 +12,7 @@ */ #ifdef HAVE_CONFIG_H -# include <config.h> +# include "config.h" #endif #include "attributes.h" #include "style.h" @@ -20,8 +20,7 @@ #include "sp-guide.h" #include "display/curve.h" #include <glibmm/i18n.h> -#include <libnr/nr-matrix-fns.h> -#include <xml/repr.h> +#include "xml/repr.h" #include "document.h" #include "inkscape.h" diff --git a/src/sp-mask.cpp b/src/sp-mask.cpp index 20cb38297..4c9e4aa99 100644 --- a/src/sp-mask.cpp +++ b/src/sp-mask.cpp @@ -16,7 +16,6 @@ #include "display/nr-arena.h" #include "display/nr-arena-group.h" -#include "libnr/nr-matrix-ops.h" #include <xml/repr.h> #include "enums.h" diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp index 556778676..2b6f535a4 100644 --- a/src/sp-offset.cpp +++ b/src/sp-offset.cpp @@ -37,7 +37,7 @@ #include "sp-use-reference.h" #include "uri.h" -#include <libnr/nr-matrix-fns.h> +#include <2geom/matrix.h> #include <2geom/pathvector.h> #include "xml/repr.h" diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 54d2a201a..dd6f60eb7 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -25,8 +25,7 @@ #include "live_effects/lpeobject-reference.h" #include "sp-lpe-item.h" -#include <display/curve.h> -#include <libnr/nr-matrix-fns.h> +#include "display/curve.h" #include <2geom/pathvector.h> #include <2geom/bezier-curve.h> #include <2geom/hvlinesegment.h> diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp index b2c718e3b..a559a4a50 100644 --- a/src/sp-pattern.cpp +++ b/src/sp-pattern.cpp @@ -18,8 +18,6 @@ #include <cstring> #include <string> -#include <libnr/nr-matrix-ops.h> -#include "libnr/nr-matrix-fns.h" #include <2geom/transforms.h> #include "macros.h" #include "svg/svg.h" @@ -111,7 +109,7 @@ sp_pattern_init (SPPattern *pat) pat->patternContentUnits = SP_PATTERN_UNITS_USERSPACEONUSE; pat->patternContentUnits_set = FALSE; - pat->patternTransform = NR::identity(); + pat->patternTransform = Geom::identity(); pat->patternTransform_set = FALSE; pat->x.unset(); @@ -207,7 +205,7 @@ sp_pattern_set (SPObject *object, unsigned int key, const gchar *value) pat->patternTransform = t; pat->patternTransform_set = TRUE; } else { - pat->patternTransform = NR::identity(); + pat->patternTransform = Geom::identity(); pat->patternTransform_set = FALSE; } object->requestModified(SP_OBJECT_MODIFIED_FLAG); diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index bdfae7c99..54f4ceea5 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -16,9 +16,7 @@ #endif -#include <display/curve.h> -#include <libnr/nr-matrix-ops.h> -#include <libnr/nr-matrix-fns.h> +#include "display/curve.h" #include <2geom/rect.h> #include "inkscape.h" diff --git a/src/sp-symbol.cpp b/src/sp-symbol.cpp index 41004db6e..5b4f24cb8 100644 --- a/src/sp-symbol.cpp +++ b/src/sp-symbol.cpp @@ -18,8 +18,6 @@ #include <cstring> #include <string> -#include "libnr/nr-matrix-fns.h" -#include "libnr/nr-matrix-ops.h" #include <2geom/transforms.h> #include "display/nr-arena-group.h" #include "xml/repr.h" diff --git a/src/sp-text.cpp b/src/sp-text.cpp index bae625f58..dd9856080 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -26,7 +26,6 @@ #endif #include <2geom/matrix.h> -#include <libnr/nr-matrix-fns.h> #include <libnrtype/FontFactory.h> #include <libnrtype/font-instance.h> #include <libnrtype/font-style-to-pos.h> diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp index 83f9ecfa6..3bc5e286b 100644 --- a/src/sp-tref.cpp +++ b/src/sp-tref.cpp @@ -33,7 +33,6 @@ #include "uri.h" #include "display/nr-arena-group.h" -#include "libnr/nr-matrix-fns.h" #include "xml/node.h" #include "xml/repr.h" diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp index 89a86218e..cf1990900 100644 --- a/src/sp-tspan.cpp +++ b/src/sp-tspan.cpp @@ -40,7 +40,6 @@ #include "sp-textpath.h" #include "text-editing.h" #include "style.h" -#include "libnr/nr-matrix-fns.h" #include "xml/repr.h" #include "document.h" diff --git a/src/sp-use.cpp b/src/sp-use.cpp index 9cd38e4b3..9efc442a9 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -20,8 +20,6 @@ #include <cstring> #include <string> -#include <libnr/nr-matrix-ops.h> -#include <libnr/nr-matrix-fns.h> #include <2geom/transforms.h> #include <glibmm/i18n.h> #include "display/nr-arena-group.h" diff --git a/src/spray-context.cpp b/src/spray-context.cpp index ee168f136..150d93c1e 100644 --- a/src/spray-context.cpp +++ b/src/spray-context.cpp @@ -38,8 +38,6 @@ #include "message-context.h" #include "pixmaps/cursor-spray.xpm" #include <boost/optional.hpp> -#include "libnr/nr-matrix-ops.h" -#include "libnr/nr-scale-translate-ops.h" #include "xml/repr.h" #include "context-fns.h" #include "sp-item.h" diff --git a/src/svg/svg-affine.cpp b/src/svg/svg-affine.cpp index 91a9fa7e5..b6dbd6d6a 100644 --- a/src/svg/svg-affine.cpp +++ b/src/svg/svg-affine.cpp @@ -20,11 +20,8 @@ #include <cstdlib> #include <cstdio> #include <glib/gstrfuncs.h> -#include <libnr/nr-matrix-fns.h> -#include <libnr/nr-matrix-ops.h> #include <2geom/transforms.h> #include <2geom/angle.h> -#include <libnr/nr-convert2geom.h> #include "svg.h" #include "preferences.h" diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp index f574b69fb..e9a543596 100644 --- a/src/text-chemistry.cpp +++ b/src/text-chemistry.cpp @@ -19,7 +19,6 @@ #include <string> #include <glibmm/i18n.h> -#include "libnr/nr-matrix-fns.h" #include "xml/repr.h" #include "sp-rect.h" #include "sp-textpath.h" @@ -150,7 +149,7 @@ text_put_on_path() Inkscape::Text::Layout::Alignment text_alignment = layout->paragraphAlignment(layout->begin()); // remove transform from text, but recursively scale text's fontsize by the expansion - SP_TEXT(text)->_adjustFontsizeRecursive (text, NR::expansion(SP_ITEM(text)->transform)); + SP_TEXT(text)->_adjustFontsizeRecursive (text, SP_ITEM(text)->transform.descrim()); SP_OBJECT_REPR(text)->setAttribute("transform", NULL); // make a list of text children @@ -316,7 +315,7 @@ text_flow_into_shape() if (SP_IS_TEXT(text)) { // remove transform from text, but recursively scale text's fontsize by the expansion - SP_TEXT(text)->_adjustFontsizeRecursive(text, NR::expansion(SP_ITEM(text)->transform)); + SP_TEXT(text)->_adjustFontsizeRecursive(text, SP_ITEM(text)->transform.descrim()); SP_OBJECT_REPR(text)->setAttribute("transform", NULL); } @@ -432,10 +431,10 @@ text_unflow () /* Set style */ rtext->setAttribute("style", SP_OBJECT_REPR(flowtext)->attribute("style")); // fixme: transfer style attrs too; and from descendants - NRRect bbox; - sp_item_invoke_bbox(SP_ITEM(flowtext), &bbox, sp_item_i2doc_affine(SP_ITEM(flowtext)), TRUE); - Geom::Point xy(bbox.x0, bbox.y0); - if (xy[Geom::X] != 1e18 && xy[Geom::Y] != 1e18) { + Geom::OptRect bbox; + sp_item_invoke_bbox(SP_ITEM(flowtext), bbox, sp_item_i2doc_affine(SP_ITEM(flowtext)), TRUE); + if (bbox) { + Geom::Point xy = bbox->min(); sp_repr_set_svg_double(rtext, "x", xy[Geom::X]); sp_repr_set_svg_double(rtext, "y", xy[Geom::Y]); } diff --git a/src/trace/trace.cpp b/src/trace/trace.cpp index e2bd0e9f5..198ffdfb2 100644 --- a/src/trace/trace.cpp +++ b/src/trace/trace.cpp @@ -14,24 +14,23 @@ #include "trace/potrace/inkscape-potrace.h" -#include <inkscape.h> -#include <desktop.h> -#include <desktop-handles.h> -#include <document.h> -#include <message-stack.h> +#include "inkscape.h" +#include "desktop.h" +#include "desktop-handles.h" +#include "document.h" +#include "message-stack.h" #include <gtkmm.h> #include <glibmm/i18n.h> -#include <selection.h> -#include <xml/repr.h> -#include <xml/attribute-record.h> -#include <sp-item.h> -#include <sp-shape.h> -#include <sp-image.h> -#include <libnr/nr-matrix-ops.h> +#include "selection.h" +#include "xml/repr.h" +#include "xml/attribute-record.h" +#include "sp-item.h" +#include "sp-shape.h" +#include "sp-image.h" #include <2geom/transforms.h> -#include <display/nr-arena.h> -#include <display/nr-arena-shape.h> +#include "display/nr-arena.h" +#include "display/nr-arena-shape.h" #include "siox.h" #include "imagemap-gdk.h" diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp index 36357ab84..6e9ec6fb4 100644 --- a/src/tweak-context.cpp +++ b/src/tweak-context.cpp @@ -40,8 +40,6 @@ #include "pixmaps/cursor-roughen.xpm" #include "pixmaps/cursor-color.xpm" #include <boost/optional.hpp> -#include "libnr/nr-matrix-ops.h" -#include "libnr/nr-scale-translate-ops.h" #include "xml/repr.h" #include "context-fns.h" #include "sp-item.h" diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index 1cab38d98..c11801fcf 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -20,7 +20,6 @@ #include "desktop-handles.h" #include "transformation.h" #include "align-and-distribute.h" -#include "libnr/nr-matrix-ops.h" #include "inkscape.h" #include "selection.h" #include "selection-chemistry.h" |
