Code

Added a bunch of comments to filter effects rendering code
[inkscape.git] / src / display / canvas-bpath.h
1 #ifndef __SP_CANVAS_BPATH_H__
2 #define __SP_CANVAS_BPATH_H__
4 /*
5  * Simple bezier bpath CanvasItem for inkscape
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@ximian.com>
9  *
10  * Copyright (C) 2001 Lauris Kaplinski and Ximian, Inc.
11  *
12  * Released under GNU GPL
13  *
14  */
16 #include <glib/gtypes.h>
18 #include <display/sp-canvas.h>
20 struct SPCanvasBPath;
21 struct SPCanvasBPathClass;
22 struct SPCurve;
24 #define SP_TYPE_CANVAS_BPATH (sp_canvas_bpath_get_type ())
25 #define SP_CANVAS_BPATH(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_CANVAS_BPATH, SPCanvasBPath))
26 #define SP_CANVAS_BPATH_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), SP_TYPE_CANVAS_BPATH, SPCanvasBPathClass))
27 #define SP_IS_CANVAS_BPATH(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_CANVAS_BPATH))
28 #define SP_IS_CANVAS_BPATH_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_CANVAS_BPATH))
30 #define bpath_liv
32 class Shape;
34 /* stroke-linejoin */
36 typedef enum {
37         SP_STROKE_LINEJOIN_MITER,
38         SP_STROKE_LINEJOIN_ROUND,
39         SP_STROKE_LINEJOIN_BEVEL
40 } SPStrokeJoinType;
42 /* stroke-linecap */
44 typedef enum {
45         SP_STROKE_LINECAP_BUTT,
46         SP_STROKE_LINECAP_ROUND,
47         SP_STROKE_LINECAP_SQUARE
48 } SPStrokeCapType;
51 /* fill-rule */
52 /* clip-rule */
54 typedef enum {
55         SP_WIND_RULE_NONZERO,
56         SP_WIND_RULE_INTERSECT,
57         SP_WIND_RULE_EVENODD,
58         SP_WIND_RULE_POSITIVE
59 } SPWindRule;
62 struct SPCanvasBPath {
63         SPCanvasItem item;
65         /* Line def */
66         SPCurve *curve;
68         /* Fill attributes */
69         guint32 fill_rgba;
70         SPWindRule fill_rule;
72         /* Line attributes */
73         guint32 stroke_rgba;
74         gdouble stroke_width;
75         SPStrokeJoinType stroke_linejoin;
76         SPStrokeCapType stroke_linecap;
77         gdouble stroke_miterlimit;
79         /* State */
80         Shape  *fill_shp;
81         Shape  *stroke_shp;
82 };
84 struct SPCanvasBPathClass {
85         SPCanvasItemClass parent_class;
86 };
88 GtkType sp_canvas_bpath_get_type (void);
90 SPCanvasItem *sp_canvas_bpath_new (SPCanvasGroup *parent, SPCurve *curve);
92 void sp_canvas_bpath_set_bpath (SPCanvasBPath *cbp, SPCurve *curve);
93 void sp_canvas_bpath_set_fill (SPCanvasBPath *cbp, guint32 rgba, SPWindRule rule);
94 void sp_canvas_bpath_set_stroke (SPCanvasBPath *cbp, guint32 rgba, gdouble width, SPStrokeJoinType join, SPStrokeCapType cap);
98 #endif