Code

Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in...
[inkscape.git] / src / display / sodipodi-ctrlrect.h
1 #ifndef __INKSCAPE_CTRLRECT_H__
2 #define __INKSCAPE_CTRLRECT_H__
4 /**
5  * \file sodipodi-ctrlrect.h
6  * \brief Simple non-transformed rectangle, usable for rubberband
7  *
8  * Authors:
9  *   Lauris Kaplinski <lauris@ximian.com>
10  *   Carl Hetherington <inkscape@carlh.net>
11  *
12  * Copyright (C) 1999-2001 Lauris Kaplinski
13  * Copyright (C) 2000-2001 Ximian, Inc.
14  *
15  * Released under GNU GPL
16  *
17  */
19 #include <glib/gtypes.h>
20 #include "sp-canvas.h"
22 #define SP_TYPE_CTRLRECT (sp_ctrlrect_get_type ())
23 #define SP_CTRLRECT(obj) (GTK_CHECK_CAST((obj), SP_TYPE_CTRLRECT, CtrlRect))
24 #define SP_CTRLRECT_CLASS(c) (GTK_CHECK_CLASS_CAST((c), SP_TYPE_CTRLRECT, SPCtrlRectClass))
25 #define SP_IS_CTRLRECT(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_CTRLRECT))
26 #define SP_IS_CTRLRECT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_CTRLRECT))
28 class CtrlRect : public SPCanvasItem
29 {
30 public:
32     void init();
33     void setColor(guint32 b, bool h, guint f);
34     void setShadow(int s, guint c);
35     void setRectangle(Geom::Rect const &r);
36     void setDashed(bool d);
38     void render(SPCanvasBuf *buf);
39     void update(Geom::Matrix const &affine, unsigned int flags);
40     
41 private:
42     void _requestUpdate();
43     
44     Geom::Rect _rect;
45     bool _has_fill;
46     bool _dashed;
47     NRRectL _area;
48     gint _shadow_size;
49     guint32 _border_color;
50     guint32 _fill_color;
51     guint32 _shadow_color;    
52     int _shadow;
53 };
55 struct SPCtrlRectClass : public SPCanvasItemClass {};
57 GtkType sp_ctrlrect_get_type();
59 #endif
61 /*
62   Local Variables:
63   mode:c++
64   c-file-style:"stroustrup"
65   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
66   indent-tabs-mode:nil
67   fill-column:99
68   End:
69 */
70 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :