Code

Fix self-snapping when dragging the transformation center of a selection containing...
[inkscape.git] / src / display / canvas-text.h
index 7d1da46f57ce3cae26c9db809484002267aacd91..e5d634985dcb8a3977b586c027a2f697d889f702 100644 (file)
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
-#include "sp-canvas.h"
+/*
+ * FIXME: The following code should actually be in a separate file called display/canvas-text.h. It
+ * temporarily had to be moved here because of linker errors.
+ */
 
 struct SPItem;
+struct SPDesktop;
 
 #define SP_TYPE_CANVASTEXT (sp_canvastext_get_type ())
 #define SP_CANVASTEXT(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_CANVASTEXT, SPCanvasText))
@@ -25,10 +29,12 @@ struct SPItem;
 struct SPCanvasText : public SPCanvasItem{
     SPItem *item;  // the item to which this line belongs in some sense; may be NULL for some users
     guint32 rgba;
+    guint32 rgba_stroke;
+    SPDesktop *desktop; // the desktop to which this text is attached; needed for coordinate transforms (TODO: these should be eliminated)
 
-    char* text;
-    NR::Point s;
-    NR::Matrix affine;
+    gchar* text;
+    Geom::Point s;
+    Geom::Matrix affine;
     double fontsize;
     double anchor_x;
     double anchor_y;
@@ -37,18 +43,19 @@ struct SPCanvasTextClass : public SPCanvasItemClass{};
 
 GtkType sp_canvastext_get_type (void);
 
-SPCanvasItem *sp_canvastext_new(SPCanvasGroup *parent, Geom::Point pos, char *text);
+SPCanvasItem *sp_canvastext_new(SPCanvasGroup *parent, SPDesktop *desktop, Geom::Point pos, gchar const *text);
 
-void sp_canvastext_set_rgba32 (SPCanvasText *ct, guint32 rgba);
+void sp_canvastext_set_rgba32 (SPCanvasText *ct, guint32 rgba, guint32 rgba_stroke);
 void sp_canvastext_set_coords (SPCanvasText *ct, gdouble x0, gdouble y0);
-void sp_canvastext_set_coords (SPCanvasText *ct, const NR::Point start);
-void sp_canvastext_set_text (SPCanvasText *ct, const char* new_text);
+void sp_canvastext_set_coords (SPCanvasText *ct, const Geom::Point start);
+void sp_canvastext_set_text (SPCanvasText *ct, gchar const* new_text);
 void sp_canvastext_set_number_as_text (SPCanvasText *ct, int num);
 void sp_canvastext_set_fontsize (SPCanvasText *ct, double size);
 void sp_canvastext_set_anchor (SPCanvasText *ct, double anchor_x, double anchor_y);
 
 #endif
 
+
 /*
   Local Variables:
   mode:c++