Code

Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
[inkscape.git] / src / display / canvas-bpath.h
index d6382b65145655b117b7771158eb4a78cfd5c457..0760baef661c3d23ba9a54d62d5b63e5540bd9dd 100644 (file)
@@ -1,13 +1,15 @@
-#ifndef __SP_CANVAS_BPATH_H__
-#define __SP_CANVAS_BPATH_H__
+#ifndef SEEN_SP_CANVAS_BPATH_H
+#define SEEN_SP_CANVAS_BPATH_H
 
 /*
  * Simple bezier bpath CanvasItem for inkscape
  *
  * Authors:
  *   Lauris Kaplinski <lauris@ximian.com>
+ *   Jon A. Cruz <jon@joncruz.org>
  *
  * Copyright (C) 2001 Lauris Kaplinski and Ximian, Inc.
+ * Copyright (C) 2010 authors
  *
  * Released under GNU GPL
  *
 
 #include <glib/gtypes.h>
 
-#include <display/sp-canvas.h>
+#include "sp-canvas-item.h"
 
 struct SPCanvasBPath;
 struct SPCanvasBPathClass;
+struct SPCanvasGroup;
 struct SPCurve;
 
 #define SP_TYPE_CANVAS_BPATH (sp_canvas_bpath_get_type ())
@@ -64,7 +67,7 @@ struct SPCanvasBPath {
 
     /* Line def */
     SPCurve *curve;
-       NR::Matrix affine;
+    Geom::Matrix affine;
 
     /* Fill attributes */
     guint32 fill_rgba;
@@ -95,45 +98,6 @@ void sp_canvas_bpath_set_bpath (SPCanvasBPath *cbp, SPCurve *curve);
 void sp_canvas_bpath_set_fill (SPCanvasBPath *cbp, guint32 rgba, SPWindRule rule);
 void sp_canvas_bpath_set_stroke (SPCanvasBPath *cbp, guint32 rgba, gdouble width, SPStrokeJoinType join, SPStrokeCapType cap, double dash=0, double gap=0);
 
-
-/*
- * 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))
-#define SP_IS_CANVASTEXT(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_CANVASTEXT))
-
-struct SPCanvasText : public SPCanvasItem{
-    SPItem *item;  // the item to which this line belongs in some sense; may be NULL for some users
-    guint32 rgba;
-    SPDesktop *desktop; // the desktop to which this text is attached; needed for coordinate transforms (TODO: these should be eliminated)
-
-    gchar* text;
-    NR::Point s;
-    NR::Matrix affine;
-    double fontsize;
-    double anchor_x;
-    double anchor_y;
-};
-struct SPCanvasTextClass : public SPCanvasItemClass{};
-
-GtkType sp_canvastext_get_type (void);
-
-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_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, 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
 
 /*
@@ -145,4 +109,4 @@ void sp_canvastext_set_anchor (SPCanvasText *ct, double anchor_x, double anchor_
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :