summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ca953aa)
raw | patch | inline | side by side (parent: ca953aa)
author | verbalshadow <verbalshadow@users.sourceforge.net> | |
Fri, 5 Dec 2008 19:56:36 +0000 (19:56 +0000) | ||
committer | verbalshadow <verbalshadow@users.sourceforge.net> | |
Fri, 5 Dec 2008 19:56:36 +0000 (19:56 +0000) |
index bd59c0aa48ae36da06ee3b91ed08db4b77d12423..f6920c2a347db8bef972fcb11e306dcea7b30524 100644 (file)
@@ -2731,7 +2731,7 @@ sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_to_la
SPItem *item = reinterpret_cast<SPItem *>(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 06d025a14ffb4a8557e95aadbbba6e4c79a8bfb1..5ee801230862cd589698b533075123371cd07f8e 100644 (file)
--- a/src/sp-clippath.cpp
+++ b/src/sp-clippath.cpp
}
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);
// Create a mask element (using passed elements), add it to <defs>
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 8f20d788041f7d1962d71680ed938be44d84798f..199b29f3b3f279e72cb5cbdc9dd90321e73f6693 100644 (file)
--- a/src/sp-clippath.h
+++ b/src/sp-clippath.h
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 9780db182fbfa0efac6bc306c1a3477e4f480dfe..25729f5d7b94c97c5f358c110db76e19a260ae8a 100644 (file)
--- a/src/sp-gradient-fns.h
+++ b/src/sp-gradient-fns.h
#include <glib/gtypes.h>
#include <glib-object.h>
-#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 e7bae29510a928937cc561e415686eac406d4b55..20cb38297c126fd07e93a27c1e6687accfc21575 100644 (file)
--- 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 <defs>
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 621029b986fe08037297438c7223f28fe6bdfee6..d5bddd332861f2f18efdbe0e3b4d8013ce1013ea 100644 (file)
--- a/src/sp-mask.h
+++ b/src/sp-mask.h
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 57ff802095c4baf7a0a91c7140d897d5efbae1c1..090c8d2760b8c9272b6ce2a00582f7ca4c6afb73 100644 (file)
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
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 a3644fdad818a16b25f1eabc490262be41248db1..d80c9740edb28cee53fecb28bd6c9cf5d498b1b3 100644 (file)
--- a/src/spiral-context.h
+++ b/src/spiral-context.h
struct SPSpiralContext : public SPEventContext {
SPItem * item;
- NR::Point center;
+ Geom::Point center;
gdouble revo;
gdouble exp;
gdouble t0;