Code

Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
[inkscape.git] / src / display / canvas-text.h
index 0e4724d92959572cb608cb4c9165210264ddc752..cc194ccc42c743947404669249fae33916978117 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SP_CANVASTEXT_H__
-#define __SP_CANVASTEXT_H__
+#ifndef SEEN_SP_CANVASTEXT_H
+#define SEEN_SP_CANVASTEXT_H
 
 /*
  * Canvas text.
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
-#include "sp-canvas.h"
+#include "sp-canvas-item.h"
 
 struct SPItem;
+struct SPDesktop;
 
 #define SP_TYPE_CANVASTEXT (sp_canvastext_get_type ())
 #define SP_CANVASTEXT(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_CANVASTEXT, SPCanvasText))
 #define SP_IS_CANVASTEXT(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_CANVASTEXT))
 
-struct SPCanvasText : public SPCanvasItem{
+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)
 
     gchar* text;
     Geom::Point s;
@@ -37,9 +40,9 @@ struct SPCanvasTextClass : public SPCanvasItemClass{};
 
 GtkType sp_canvastext_get_type (void);
 
-SPCanvasItem *sp_canvastext_new(SPCanvasGroup *parent, Geom::Point pos, gchar const *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 Geom::Point start);
 void sp_canvastext_set_text (SPCanvasText *ct, gchar const* new_text);
@@ -47,7 +50,8 @@ 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
+#endif // SEEN_SP_CANVASTEXT_H
+
 
 /*
   Local Variables: