1 #ifndef SEEN_SP_RECT_H
2 #define SEEN_SP_RECT_H
4 /*
5 * SVG <rect> implementation
6 *
7 * Authors:
8 * Lauris Kaplinski <lauris@kaplinski.com>
9 * Abhishek Sharma
10 *
11 * Copyright (C) 1999-2002 Lauris Kaplinski
12 * Copyright (C) 2000-2001 Ximian, Inc.
13 *
14 * Released under GNU GPL, read the file 'COPYING' for more information
15 */
17 #include "svg/svg-length.h"
18 #include "sp-shape.h"
19 #include <2geom/forward.h>
23 #define SP_TYPE_RECT (sp_rect_get_type ())
24 #define SP_RECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_RECT, SPRect))
25 #define SP_RECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_RECT, SPRectClass))
26 #define SP_IS_RECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_RECT))
27 #define SP_IS_RECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_RECT))
29 class SPRect;
30 class SPRectClass;
32 struct SPRect : public SPShape {
33 SVGLength x;
34 SVGLength y;
35 SVGLength width;
36 SVGLength height;
37 SVGLength rx;
38 SVGLength ry;
39 };
41 struct SPRectClass {
42 SPShapeClass parent_class;
43 };
46 /* Standard GType function */
47 GType sp_rect_get_type (void);
49 void sp_rect_position_set (SPRect * rect, gdouble x, gdouble y, gdouble width, gdouble height);
51 /* If SET if FALSE, VALUE is just ignored */
52 void sp_rect_set_rx(SPRect * rect, gboolean set, gdouble value);
53 void sp_rect_set_ry(SPRect * rect, gboolean set, gdouble value);
55 void sp_rect_set_visible_rx (SPRect *rect, gdouble rx);
56 void sp_rect_set_visible_ry (SPRect *rect, gdouble ry);
57 gdouble sp_rect_get_visible_rx (SPRect *rect);
58 gdouble sp_rect_get_visible_ry (SPRect *rect);
59 Geom::Rect sp_rect_get_rect (SPRect *rect);
61 void sp_rect_set_visible_width (SPRect *rect, gdouble rx);
62 void sp_rect_set_visible_height (SPRect *rect, gdouble ry);
63 gdouble sp_rect_get_visible_width (SPRect *rect);
64 gdouble sp_rect_get_visible_height (SPRect *rect);
66 void sp_rect_compensate_rxry (SPRect *rect, Geom::Matrix xform);
68 #endif // SEEN_SP_RECT_H
70 /*
71 Local Variables:
72 mode:c++
73 c-file-style:"stroustrup"
74 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
75 indent-tabs-mode:nil
76 fill-column:99
77 End:
78 */
79 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :