1 #ifndef SP_ROOT_H_SEEN
2 #define SP_ROOT_H_SEEN
4 /** \file
5 * SPRoot: SVG \<svg\> implementation.
6 */
7 /*
8 * Authors:
9 * Lauris Kaplinski <lauris@kaplinski.com>
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 #define SP_TYPE_ROOT (sp_root_get_type())
18 #define SP_ROOT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_ROOT, SPRoot))
19 #define SP_ROOT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SP_TYPE_ROOT, SPRootClass))
20 #define SP_IS_ROOT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_ROOT))
21 #define SP_IS_ROOT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_ROOT))
23 #include "version.h"
24 #include "svg/svg-length.h"
25 #include "enums.h"
26 #include "sp-item-group.h"
28 /** \<svg\> element */
29 struct SPRoot : public SPGroup {
30 struct {
31 Inkscape::Version svg;
32 Inkscape::Version sodipodi;
33 Inkscape::Version inkscape;
34 } version, original;
36 SVGLength x;
37 SVGLength y;
38 SVGLength width;
39 SVGLength height;
41 /* viewBox; */
42 unsigned int viewBox_set : 1;
43 NRRect viewBox;
45 /* preserveAspectRatio */
46 unsigned int aspect_set : 1;
47 unsigned int aspect_align : 4;
48 unsigned int aspect_clip : 1;
50 /** Child to parent additional transform. */
51 Geom::Matrix c2p;
53 gchar *onload;
55 /**
56 * Primary \<defs\> element where we put new defs (patterns, gradients etc.).
57 *
58 * At the time of writing, this is chosen as the first \<defs\> child of
59 * this \<svg\> element: see writers of this member in sp-root.cpp.
60 */
61 SPDefs *defs;
62 };
64 struct SPRootClass {
65 SPGroupClass parent_class;
66 };
68 GType sp_root_get_type();
71 #endif /* !SP_ROOT_H_SEEN */
73 /*
74 Local Variables:
75 mode:c++
76 c-file-style:"stroustrup"
77 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
78 indent-tabs-mode:nil
79 fill-column:99
80 End:
81 */
82 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :