Code

Merge from trunk
[inkscape.git] / src / display / canvas-bpath.h
index 5a6e6e7ff6bc810c0c63bc5fb24f9d215bb2248c..b97bbcc6b5b593b161d4bba178845a66019a319b 100644 (file)
@@ -64,7 +64,7 @@ struct SPCanvasBPath {
 
     /* Line def */
     SPCurve *curve;
-       NR::Matrix affine;
+    Geom::Matrix affine;
 
     /* Fill attributes */
     guint32 fill_rgba;
@@ -73,6 +73,7 @@ struct SPCanvasBPath {
     /* Line attributes */
     guint32 stroke_rgba;
     gdouble stroke_width;
+    gdouble dashes[2];
     SPStrokeJoinType stroke_linejoin;
     SPStrokeCapType stroke_linecap;
     gdouble stroke_miterlimit;
@@ -92,46 +93,7 @@ SPCanvasItem *sp_canvas_bpath_new (SPCanvasGroup *parent, SPCurve *curve);
 
 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);
-
-
-/*
- * 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)
-
-    char* 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, char *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, const char* 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);
+void sp_canvas_bpath_set_stroke (SPCanvasBPath *cbp, guint32 rgba, gdouble width, SPStrokeJoinType join, SPStrokeCapType cap, double dash=0, double gap=0);
 
 #endif