From 9d24c3279941c5e2e76ac2f0dbd519ddbff24e58 Mon Sep 17 00:00:00 2001 From: verbalshadow Date: Fri, 5 Dec 2008 19:56:36 +0000 Subject: [PATCH] NR -> 2Geom, more h and cpp files --- src/selection-chemistry.cpp | 2 +- src/sp-clippath.cpp | 10 +++++----- src/sp-clippath.h | 4 ++-- src/sp-gradient-fns.h | 14 +++++++------- src/sp-mask.cpp | 4 ++-- src/sp-mask.h | 2 +- src/spiral-context.cpp | 2 +- src/spiral-context.h | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index bd59c0aa4..f6920c2a3 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -2731,7 +2731,7 @@ sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_to_la SPItem *item = reinterpret_cast(i->data); // inverted object transform should be applied to a mask object, // as mask is calculated in user space (after applying transform) - NR::Matrix maskTransform (item->transform.inverse()); + Geom::Matrix maskTransform (item->transform.inverse()); GSList *mask_items_dup = NULL; for (GSList *mask_item = mask_items; NULL != mask_item; mask_item = mask_item->next) { diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index 06d025a14..5ee801230 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -325,19 +325,19 @@ sp_clippath_set_bbox(SPClipPath *cp, unsigned int key, NRRect *bbox) } void -sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, NR::Matrix const &transform, unsigned const /*flags*/) +sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, Geom::Matrix const &transform, unsigned const /*flags*/) { SPObject *i; for (i = sp_object_first_child(SP_OBJECT(cp)); i && !SP_IS_ITEM(i); i = SP_OBJECT_NEXT(i)); if (!i) return; - sp_item_invoke_bbox_full(SP_ITEM(i), bbox, NR::Matrix(SP_ITEM(i)->transform) * transform, SPItem::GEOMETRIC_BBOX, FALSE); + sp_item_invoke_bbox_full(SP_ITEM(i), bbox, Geom::Matrix(SP_ITEM(i)->transform) * transform, SPItem::GEOMETRIC_BBOX, FALSE); SPObject *i_start = i; while (i != NULL) { if (i != i_start) { NRRect i_box; - sp_item_invoke_bbox_full(SP_ITEM(i), &i_box, NR::Matrix(SP_ITEM(i)->transform) * transform, SPItem::GEOMETRIC_BBOX, FALSE); + sp_item_invoke_bbox_full(SP_ITEM(i), &i_box, Geom::Matrix(SP_ITEM(i)->transform) * transform, SPItem::GEOMETRIC_BBOX, FALSE); nr_rect_d_union (bbox, bbox, &i_box); } i = SP_OBJECT_NEXT(i); @@ -381,7 +381,7 @@ sp_clippath_view_list_remove(SPClipPathView *list, SPClipPathView *view) // Create a mask element (using passed elements), add it to const gchar * -sp_clippath_create (GSList *reprs, SPDocument *document, NR::Matrix const* applyTransform) +sp_clippath_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform) { Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document)); @@ -398,7 +398,7 @@ sp_clippath_create (GSList *reprs, SPDocument *document, NR::Matrix const* apply SPItem *item = SP_ITEM(clip_path_object->appendChildRepr(node)); if (NULL != applyTransform) { - NR::Matrix transform (item->transform); + Geom::Matrix transform (item->transform); transform *= (*applyTransform); sp_item_write_transform(item, SP_OBJECT_REPR(item), transform); } diff --git a/src/sp-clippath.h b/src/sp-clippath.h index 8f20d7880..199b29f3b 100644 --- a/src/sp-clippath.h +++ b/src/sp-clippath.h @@ -57,8 +57,8 @@ NRArenaItem *sp_clippath_show(SPClipPath *cp, NRArena *arena, unsigned int key); void sp_clippath_hide(SPClipPath *cp, unsigned int key); void sp_clippath_set_bbox(SPClipPath *cp, unsigned int key, NRRect *bbox); -void sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, NR::Matrix const &transform, unsigned const flags); +void sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags); -const gchar *sp_clippath_create (GSList *reprs, SPDocument *document, NR::Matrix const* applyTransform); +const gchar *sp_clippath_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform); #endif diff --git a/src/sp-gradient-fns.h b/src/sp-gradient-fns.h index 9780db182..25729f5d7 100644 --- a/src/sp-gradient-fns.h +++ b/src/sp-gradient-fns.h @@ -7,7 +7,7 @@ #include #include -#include "libnr/nr-forward.h" +#include <2geom/forward.h> #include "sp-gradient-spread.h" #include "sp-gradient-units.h" @@ -54,12 +54,12 @@ void sp_gradient_render_vector_block_rgba(SPGradient *gr, guchar *px, gint w, gi void sp_gradient_render_vector_block_rgb(SPGradient *gr, guchar *px, gint w, gint h, gint rs, gint pos, gint span, bool horizontal); /** Transforms to/from gradient position space in given environment */ -NR::Matrix sp_gradient_get_g2d_matrix(SPGradient const *gr, NR::Matrix const &ctm, - NR::Rect const &bbox); -NR::Matrix sp_gradient_get_gs2d_matrix(SPGradient const *gr, NR::Matrix const &ctm, - NR::Rect const &bbox); -void sp_gradient_set_gs2d_matrix(SPGradient *gr, NR::Matrix const &ctm, NR::Rect const &bbox, - NR::Matrix const &gs2d); +Geom::Matrix sp_gradient_get_g2d_matrix(SPGradient const *gr, Geom::Matrix const &ctm, + Geom::Rect const &bbox); +Geom::Matrix sp_gradient_get_gs2d_matrix(SPGradient const *gr, Geom::Matrix const &ctm, + Geom::Rect const &bbox); +void sp_gradient_set_gs2d_matrix(SPGradient *gr, Geom::Matrix const &ctm, Geom::Rect const &bbox, + Geom::Matrix const &gs2d); #endif /* !SEEN_SP_GRADIENT_FNS_H */ diff --git a/src/sp-mask.cpp b/src/sp-mask.cpp index e7bae2951..20cb38297 100644 --- a/src/sp-mask.cpp +++ b/src/sp-mask.cpp @@ -270,7 +270,7 @@ sp_mask_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML // Create a mask element (using passed elements), add it to const gchar * -sp_mask_create (GSList *reprs, SPDocument *document, NR::Matrix const* applyTransform) +sp_mask_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform) { Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document)); @@ -287,7 +287,7 @@ sp_mask_create (GSList *reprs, SPDocument *document, NR::Matrix const* applyTran SPItem *item = SP_ITEM(mask_object->appendChildRepr(node)); if (NULL != applyTransform) { - NR::Matrix transform (item->transform); + Geom::Matrix transform (item->transform); transform *= (*applyTransform); sp_item_write_transform(item, SP_OBJECT_REPR(item), transform); } diff --git a/src/sp-mask.h b/src/sp-mask.h index 621029b98..d5bddd332 100644 --- a/src/sp-mask.h +++ b/src/sp-mask.h @@ -60,6 +60,6 @@ void sp_mask_hide (SPMask *mask, unsigned int key); void sp_mask_set_bbox (SPMask *mask, unsigned int key, NRRect *bbox); -const gchar *sp_mask_create (GSList *reprs, SPDocument *document, NR::Matrix const* applyTransform); +const gchar *sp_mask_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform); #endif diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp index 57ff80209..090c8d276 100644 --- a/src/spiral-context.cpp +++ b/src/spiral-context.cpp @@ -452,7 +452,7 @@ sp_spiral_drag(SPSpiralContext *sc, Geom::Point p, guint state) Geom::Point const delta = p1 - p0; gdouble const rad = Geom::L2(delta); - gdouble arg = NR::atan2(delta) - 2.0*M_PI*spiral->revo; + gdouble arg = Geom::atan2(delta) - 2.0*M_PI*spiral->revo; if (state & GDK_CONTROL_MASK) { arg = sp_round(arg, M_PI/snaps); diff --git a/src/spiral-context.h b/src/spiral-context.h index a3644fdad..d80c9740e 100644 --- a/src/spiral-context.h +++ b/src/spiral-context.h @@ -31,7 +31,7 @@ class SPSpiralContextClass; struct SPSpiralContext : public SPEventContext { SPItem * item; - NR::Point center; + Geom::Point center; gdouble revo; gdouble exp; gdouble t0; -- 2.30.2