summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 561be44)
raw | patch | inline | side by side (parent: 561be44)
author | speleo3 <speleo3@users.sourceforge.net> | |
Fri, 13 Mar 2009 17:13:24 +0000 (17:13 +0000) | ||
committer | speleo3 <speleo3@users.sourceforge.net> | |
Fri, 13 Mar 2009 17:13:24 +0000 (17:13 +0000) |
15 files changed:
diff --git a/src/Makefile_insert b/src/Makefile_insert
index a3babf265720d4c24cc29e0886b06f42909d0c38..de986ca16e3a19fec2f3f1943ede0926a82c766e 100644 (file)
--- a/src/Makefile_insert
+++ b/src/Makefile_insert
console-output-undo-observer.h console-output-undo-observer.cpp \
context-fns.cpp context-fns.h \
decimal-round.h \
- desktop-affine.h \
desktop.cpp desktop.h \
desktop-events.cpp desktop-events.h \
desktop-handles.cpp desktop-handles.h \
index a3bb19de6d6131c397c66669f171f2ca53fb69bb..e364336c48a86bca26949ea5316fc067cbe039d6 100644 (file)
#include "svg/svg.h"
#include "desktop.h"
#include "desktop-style.h"
-#include "desktop-affine.h"
#include "desktop-handles.h"
#include "document.h"
#include "message-context.h"
}
/* Now we have to go back to item coordinates at last */
- c->transform(sp_desktop_dt2doc_affine(SP_EVENT_CONTEXT_DESKTOP(cc)));
+ c->transform(SP_EVENT_CONTEXT_DESKTOP(cc)->dt2doc());
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc);
SPDocument *doc = sp_desktop_document(desktop);
diff --git a/src/context-fns.cpp b/src/context-fns.cpp
index 30062504cfd03d81f91f01b4bd7e2d74026eca51..50942b80a77b1ffbe58329ef3fb7e25a866328c5 100644 (file)
--- a/src/context-fns.cpp
+++ b/src/context-fns.cpp
#include "message-stack.h"
#include "context-fns.h"
#include "snap.h"
-#include "desktop-affine.h"
#include "event-context.h"
#include "sp-namedview.h"
#include "display/snap-indicator.h"
@@ -207,8 +206,8 @@ Geom::Rect Inkscape::snap_rectangular_box(SPDesktop const *desktop, SPItem *item
desktop->snapindicator->set_new_snaptarget(snappoint);
}
- p[0] = sp_desktop_dt2doc_xy_point(desktop, p[0]);
- p[1] = sp_desktop_dt2doc_xy_point(desktop, p[1]);
+ p[0] *= desktop->dt2doc();
+ p[1] *= desktop->dt2doc();
return Geom::Rect(Geom::Point(MIN(p[0][Geom::X], p[1][Geom::X]), MIN(p[0][Geom::Y], p[1][Geom::Y])),
Geom::Point(MAX(p[0][Geom::X], p[1][Geom::X]), MAX(p[0][Geom::Y], p[1][Geom::Y])));
diff --git a/src/desktop-affine.h b/src/desktop-affine.h
--- a/src/desktop-affine.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef __SP_DESKTOP_AFFINE_H__
-#define __SP_DESKTOP_AFFINE_H__
-
-/*
- * Desktop transformations
- *
- * Authors:
- * Lauris Kaplinski <lauris@kaplinski.com>
- *
- * Copyright (C) 1999-2002 Lauris Kaplinski
- * Copyright (C) 2000-2001 Ximian, Inc.
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#include "desktop.h"
-
-#define sp_desktop_dt2doc_affine(desktop) desktop->dt2doc()
-#define sp_desktop_dt2doc_xy_point(desktop,point) desktop->dt2doc(point)
-
-#endif
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
diff --git a/src/doxygen-main.cpp b/src/doxygen-main.cpp
index bfca9b21a9c465bac2e9725afbb5d728048d1122..fd8f4bb1a2e5c1abccb75c56bd1856a1d45ecd41 100644 (file)
--- a/src/doxygen-main.cpp
+++ b/src/doxygen-main.cpp
*
* - Inkscape::UI::View::View [\ref ui/view/view.cpp, \ref ui/view/view.h]
* - Inkscape::UI::View::Edit [\ref ui/view/edit.cpp, \ref ui/view/edit.h]
- * - SPDesktop [\ref desktop.cpp, \ref desktop-affine.cpp, \ref desktop-events.cpp, \ref desktop-handles.cpp, \ref desktop-style.cpp, \ref desktop.h, \ref desktop-affine.h, \ref desktop-events.h, \ref desktop-handles.h, \ref desktop-style.h]
+ * - SPDesktop [\ref desktop.cpp, \ref desktop-events.cpp, \ref desktop-handles.cpp, \ref desktop-style.cpp, \ref desktop.h, \ref desktop-events.h, \ref desktop-handles.h, \ref desktop-style.h]
* - SPSVGView [\ref svg-view.cpp, \ref svg-view.h]
*
* SPDesktopWidget [\ref desktop-widget.h] SPSVGSPViewWidget [\ref svg-view.cpp]
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index c86e2cc69826f0ebad07620ebdee98efed572e78..3891ce331818e1442fec6d396b6487ae4ec38ca0 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
#include <glibmm/i18n.h>
#include "display/curve.h"
#include "desktop.h"
-#include "desktop-affine.h"
#include "desktop-handles.h"
#include "desktop-style.h"
#include "document.h"
/* Now we have to go back to item coordinates at last */
c->transform( dc->white_item
? sp_item_dt2i_affine(dc->white_item)
- : to_2geom(sp_desktop_dt2doc_affine(SP_EVENT_CONTEXT_DESKTOP(dc))) );
+ : SP_EVENT_CONTEXT_DESKTOP(dc)->dt2doc() );
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(dc);
SPDocument *doc = sp_desktop_document(desktop);
index 23a264c80d83208cac874d658f760a782b2ca001..bb8e690923e66402bdabd7f5e71914e3267ff809 100644 (file)
#include "desktop.h"
#include "desktop-events.h"
#include "desktop-handles.h"
-#include "desktop-affine.h"
#include "desktop-style.h"
#include "message-context.h"
#include "preferences.h"
item->transform = sp_item_i2doc_affine(SP_ITEM(desktop->currentLayer())).inverse();
item->updateRepr();
}
- Geom::PathVector pathv = dc->accumulated->get_pathvector() * sp_desktop_dt2doc_affine(desktop);
+ Geom::PathVector pathv = dc->accumulated->get_pathvector() * desktop->dt2doc();
gchar *str = sp_svg_write_path(pathv);
g_assert( str != NULL );
dc->repr->setAttribute("d", str);
diff --git a/src/eraser-context.cpp b/src/eraser-context.cpp
index 8854dbcec9e65241b6852b6fa79cf1b5b9bc2d50..022de409055cb0725e1a064b215cc3757dce3d5f 100644 (file)
--- a/src/eraser-context.cpp
+++ b/src/eraser-context.cpp
#include "desktop.h"
#include "desktop-events.h"
#include "desktop-handles.h"
-#include "desktop-affine.h"
#include "desktop-style.h"
#include "message-context.h"
#include "preferences.h"
item->transform = sp_item_i2doc_affine(SP_ITEM(desktop->currentLayer())).inverse();
item->updateRepr();
}
- Geom::PathVector pathv = dc->accumulated->get_pathvector() * sp_desktop_dt2doc_affine(desktop);
+ Geom::PathVector pathv = dc->accumulated->get_pathvector() * desktop->dt2doc();
gchar *str = sp_svg_write_path(pathv);
g_assert( str != NULL );
dc->repr->setAttribute("d", str);
diff --git a/src/object-edit.cpp b/src/object-edit.cpp
index edb1a0134da11e8c0f462d5cc036e5318bbe1f1c..a9cf202983efc0b39492c7fb80b4b02f11400b69 100644 (file)
--- a/src/object-edit.cpp
+++ b/src/object-edit.cpp
#include "sp-offset.h"
#include "sp-flowtext.h"
#include "preferences.h"
-#include "desktop-affine.h"
#include "style.h"
#include "desktop.h"
#include "desktop-handles.h"
diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp
index c6c0950146790700ce1b24d4f01322e425d9768e..6af2f7169eaf3c9eb34ed451470c0d9ee4fa0aa1 100644 (file)
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
#include "selection.h"
#include "desktop-handles.h"
#include "desktop.h"
-#include "desktop-affine.h"
#include "xml/repr.h"
@@ -697,8 +696,8 @@ SPItem *create_flowtext_with_internal_frame (SPDesktop *desktop, Geom::Point p0,
SPObject *rect = doc->getObjectByRepr(rect_repr);
- p0 = sp_desktop_dt2doc_xy_point(desktop, p0);
- p1 = sp_desktop_dt2doc_xy_point(desktop, p1);
+ p0 *= desktop->dt2doc();
+ p1 *= desktop->dt2doc();
using Geom::X;
using Geom::Y;
Geom::Coord const x0 = MIN(p0[X], p1[X]);
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index 3689ae4af3fbbe9bea974c9b5306786e08fe7d6c..e91f550dc070dbb1c37806b86b5c840a3d6b98a3 100644 (file)
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
#include "sp-namedview.h"
#include "selection.h"
#include "desktop-handles.h"
-#include "desktop-affine.h"
#include "snap.h"
#include "desktop.h"
#include "desktop-style.h"
Geom::Point pt2g = to_2geom(p);
m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, pt2g, Inkscape::SNAPSOURCE_HANDLE);
- Geom::Point const p0 = to_2geom(sp_desktop_dt2doc_xy_point(desktop, sc->center));
- Geom::Point const p1 = to_2geom(sp_desktop_dt2doc_xy_point(desktop, from_2geom(pt2g)));
+ Geom::Point const p0 = desktop->dt2doc(sc->center);
+ Geom::Point const p1 = desktop->dt2doc(pt2g);
SPSpiral *spiral = SP_SPIRAL(sc->item);
diff --git a/src/star-context.cpp b/src/star-context.cpp
index 54c431e2cadc656c1818f62bd3a9b4cfeb297de6..b2c56cc7f72ed7f145102ed646e60b7ef6a70eed 100644 (file)
--- a/src/star-context.cpp
+++ b/src/star-context.cpp
#include "sp-namedview.h"
#include "selection.h"
#include "desktop-handles.h"
-#include "desktop-affine.h"
#include "snap.h"
#include "desktop.h"
#include "desktop-style.h"
Geom::Point pt2g = to_2geom(p);
m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, pt2g, Inkscape::SNAPSOURCE_HANDLE);
- Geom::Point const p0 = to_2geom(sp_desktop_dt2doc_xy_point(desktop, sc->center));
- Geom::Point const p1 = to_2geom(sp_desktop_dt2doc_xy_point(desktop, from_2geom(pt2g)));
+ Geom::Point const p0 = desktop->dt2doc(sc->center);
+ Geom::Point const p1 = desktop->dt2doc(pt2g);
SPStar *star = SP_STAR(sc->item);
diff --git a/src/text-context.cpp b/src/text-context.cpp
index b2efd0cc21dfbeb4b40fe2883a9603dd1bc19e82..d743d45c2a3ab6af07a353bb710341f97bcbe8e0 100644 (file)
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
#include "desktop.h"
#include "desktop-style.h"
#include "desktop-handles.h"
-#include "desktop-affine.h"
#include "message-stack.h"
#include "message-context.h"
#include "pixmaps/cursor-text.xpm"
@@ -670,7 +669,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
/* Button 1, set X & Y & new item */
sp_desktop_selection(desktop)->clear();
Geom::Point dtp = desktop->w2d(Geom::Point(event->button.x, event->button.y));
- tc->pdoc = sp_desktop_dt2doc_xy_point(desktop, dtp);
+ tc->pdoc = desktop->dt2doc(dtp);
tc->show = TRUE;
tc->phase = 1;
diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp
index fd8f098fe9664bd69a85958905baed57bad45a07..7d797915e7779a30b80db4ecbd9421fdd75f1288 100644 (file)
--- a/src/tweak-context.cpp
+++ b/src/tweak-context.cpp
#include "desktop.h"
#include "desktop-events.h"
#include "desktop-handles.h"
-#include "desktop-affine.h"
#include "desktop-style.h"
#include "message-context.h"
#include "pixmaps/cursor-tweak-move.xpm"
index df2b422ca620329aee2567bfc3a6ba8ba14eea57..5c96bc40e31e026ce4bf179a8c1a1bd4b52f9774 100644 (file)
SET(ui_view_SRC
desktop.cpp
-desktop-affine.cpp
desktop-events.cpp
desktop-handles.cpp
desktop-style.cpp