Code

patch 1219308 for embedding type 1 fonts into ps/eps output
[inkscape.git] / src / seltrans.h
index 30be58eeb98ba4d16773328cb7b9845403672858..3ba56ffb4ce18223a5821073c7dacb71f6feab48 100644 (file)
@@ -8,6 +8,7 @@
  *   Lauris Kaplinski <lauris@kaplinski.com>
  *   Carl Hetherington <inkscape@carlh.net>
  *
+ * Copyright (C) 2006      Johan Engelen <johan@shouraizou.nl>
  * Copyright (C) 1999-2002 Lauris Kaplinski
  *
  * Released under GNU GPL, read the file 'COPYING' for more information
@@ -65,6 +66,7 @@ public:
 
     gboolean handleRequest(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle);
     void handleGrab(SPKnot *knot, guint state, SPSelTransHandle const &handle);
+    void handleClick(SPKnot *knot, guint state, SPSelTransHandle const &handle);
     void handleNewEvent(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle);
 
     enum Show
@@ -79,6 +81,9 @@ public:
     bool isEmpty() {
         return _empty;
     }
+    bool isGrabbed() {
+        return _grabbed;    
+    }
     
 private:
     void _updateHandles();
@@ -87,8 +92,7 @@ private:
     void _selModified(Inkscape::Selection *selection, guint flags);
     void _showHandles(SPKnot *knot[], SPSelTransHandle const handle[], gint num,
                       gchar const *even_tip, gchar const *odd_tip);
-    void _centreTrans(Inkscape::XML::Node *current) const;
-    
+
     enum State {
         STATE_SCALE,
        STATE_ROTATE
@@ -97,6 +101,7 @@ private:
     SPDesktop *_desktop;
 
     std::vector<std::pair<SPItem *, NR::Matrix> > _items;
+    std::vector<std::pair<SPItem *, NR::Point> > _items_centers;
     
     std::vector<NR::Point> _snap_points;
     std::vector<NR::Point> _bbox_points;
@@ -116,7 +121,10 @@ private:
     gdouble _strokewidth;
     NR::Matrix _current;
     NR::Point _opposite; ///< opposite point to where a scale is taking place
+
     NR::Point _center;
+    bool _center_is_set; ///< we've already set _center, no need to reread it from items
+
     SPKnot *_shandle[8];
     SPKnot *_rhandle[8];
     SPKnot *_chandle;