From f46cc1179e44ec373cfaa02c7140fda8757660cf Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Wed, 6 Aug 2008 21:28:34 +0000 Subject: 1) When pasting, use an offset that is a multiple of the grid pitch (got lost during a previous round of refactoring) 2) Refactor some of the pasting code (bzr r6580) --- src/display/canvas-axonomgrid.h | 9 ++------- src/display/canvas-grid.h | 13 +++++++------ 2 files changed, 9 insertions(+), 13 deletions(-) (limited to 'src/display') diff --git a/src/display/canvas-axonomgrid.h b/src/display/canvas-axonomgrid.h index 668c59649..564d266a6 100644 --- a/src/display/canvas-axonomgrid.h +++ b/src/display/canvas-axonomgrid.h @@ -41,18 +41,13 @@ public: void readRepr(); void onReprAttrChanged (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive); - SPUnit const* gridunit; - - NR::Point origin; /**< Origin of the grid */ double lengthy; /**< The lengths of the primary y-axis */ double angle_deg[3]; /**< Angle of each axis (note that angle[2] == 0) */ double angle_rad[3]; /**< Angle of each axis (note that angle[2] == 0) */ double tan_angle[3]; /**< tan(angle[.]) */ - guint32 color; /**< Color for normal lines */ - guint32 empcolor; /**< Color for emphasis lines */ - gint empspacing; /**< Spacing between emphasis lines */ + bool scaled; /**< Whether the grid is in scaled mode */ - + NR::Point ow; /**< Transformed origin by the affine for the zoom */ double lyw; /**< Transformed length y by the affine for the zoom */ double lxw_x; diff --git a/src/display/canvas-grid.h b/src/display/canvas-grid.h index a9e317534..5d674bb2d 100644 --- a/src/display/canvas-grid.h +++ b/src/display/canvas-grid.h @@ -89,6 +89,13 @@ public: Gtk::Widget * newWidget(); + NR::Point origin; /**< Origin of the grid */ + guint32 color; /**< Color for normal lines */ + guint32 empcolor; /**< Color for emphasis lines */ + gint empspacing; /**< Spacing between emphasis lines */ + + SPUnit const* gridunit; + Inkscape::XML::Node * repr; SPDocument *doc; @@ -130,12 +137,6 @@ public: void readRepr(); void onReprAttrChanged (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive); - NR::Point origin; - guint32 color; - guint32 empcolor; - gint empspacing; - SPUnit const* gridunit; - NR::Point spacing; /**< Spacing between elements of the grid */ bool scaled[2]; /**< Whether the grid is in scaled mode, which can be different in the X or Y direction, hense two -- cgit v1.2.3