Code

Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
[inkscape.git] / src / display / canvas-bpath.h
index 072fe1087ec0ac52a2f267dd9125f90bc772fba3..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 ())
@@ -34,17 +37,17 @@ class Shape;
 /* stroke-linejoin */
 
 typedef enum {
-       SP_STROKE_LINEJOIN_MITER,
-       SP_STROKE_LINEJOIN_ROUND,
-       SP_STROKE_LINEJOIN_BEVEL
+    SP_STROKE_LINEJOIN_MITER,
+    SP_STROKE_LINEJOIN_ROUND,
+    SP_STROKE_LINEJOIN_BEVEL
 } SPStrokeJoinType;
 
 /* stroke-linecap */
 
 typedef enum {
-       SP_STROKE_LINECAP_BUTT,
-       SP_STROKE_LINECAP_ROUND,
-       SP_STROKE_LINECAP_SQUARE
+    SP_STROKE_LINECAP_BUTT,
+    SP_STROKE_LINECAP_ROUND,
+    SP_STROKE_LINECAP_SQUARE
 } SPStrokeCapType;
 
 
@@ -52,37 +55,39 @@ typedef enum {
 /* clip-rule */
 
 typedef enum {
-       SP_WIND_RULE_NONZERO,
-       SP_WIND_RULE_INTERSECT,
-       SP_WIND_RULE_EVENODD,
-       SP_WIND_RULE_POSITIVE
+    SP_WIND_RULE_NONZERO,
+    SP_WIND_RULE_INTERSECT,
+    SP_WIND_RULE_EVENODD,
+    SP_WIND_RULE_POSITIVE
 } SPWindRule;
 
 
 struct SPCanvasBPath {
-       SPCanvasItem item;
-
-       /* Line def */
-       SPCurve *curve;
-
-       /* Fill attributes */
-       guint32 fill_rgba;
-       SPWindRule fill_rule;
-
-       /* Line attributes */
-       guint32 stroke_rgba;
-       gdouble stroke_width;
-       SPStrokeJoinType stroke_linejoin;
-       SPStrokeCapType stroke_linecap;
-       gdouble stroke_miterlimit;
-
-       /* State */
-       Shape  *fill_shp;
-       Shape  *stroke_shp;
+    SPCanvasItem item;
+
+    /* Line def */
+    SPCurve *curve;
+    Geom::Matrix affine;
+
+    /* Fill attributes */
+    guint32 fill_rgba;
+    SPWindRule fill_rule;
+
+    /* Line attributes */
+    guint32 stroke_rgba;
+    gdouble stroke_width;
+    gdouble dashes[2];
+    SPStrokeJoinType stroke_linejoin;
+    SPStrokeCapType stroke_linecap;
+    gdouble stroke_miterlimit;
+
+    /* State */
+    Shape  *fill_shp;
+    Shape  *stroke_shp;
 };
 
 struct SPCanvasBPathClass {
-       SPCanvasItemClass parent_class;
+    SPCanvasItemClass parent_class;
 };
 
 GtkType sp_canvas_bpath_get_type (void);
@@ -91,9 +96,17 @@ 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);
-
-
+void sp_canvas_bpath_set_stroke (SPCanvasBPath *cbp, guint32 rgba, gdouble width, SPStrokeJoinType join, SPStrokeCapType cap, double dash=0, double gap=0);
 
 #endif
 
+/*
+  Local Variables:
+  mode:c++
+  c-file-style:"stroustrup"
+  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+  indent-tabs-mode:nil
+  fill-column:99
+  End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :