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 <libnr/nr-matrix.h>
24 #include "version.h"
25 #include "svg/svg-length.h"
26 #include "enums.h"
27 #include "sp-item-group.h"
29 /** \<svg\> element */
30 struct SPRoot : public SPGroup {
31 struct {
32 Inkscape::Version svg;
33 Inkscape::Version sodipodi;
34 Inkscape::Version inkscape;
35 } version, original;
37 SVGLength x;
38 SVGLength y;
39 SVGLength width;
40 SVGLength height;
42 /* viewBox; */
43 unsigned int viewBox_set : 1;
44 NRRect viewBox;
46 /* preserveAspectRatio */
47 unsigned int aspect_set : 1;
48 unsigned int aspect_align : 4;
49 unsigned int aspect_clip : 1;
51 /** Child to parent additional transform. */
52 NR::Matrix c2p;
54 /**
55 * Primary \<defs\> element where we put new defs (patterns, gradients etc.).
56 *
57 * At the time of writing, this is chosen as the first \<defs\> child of
58 * this \<svg\> element: see writers of this member in sp-root.cpp.
59 */
60 SPDefs *defs;
61 };
63 struct SPRootClass {
64 SPGroupClass parent_class;
65 };
67 GType sp_root_get_type();
70 #endif /* !SP_ROOT_H_SEEN */
72 /*
73 Local Variables:
74 mode:c++
75 c-file-style:"stroustrup"
76 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
77 indent-tabs-mode:nil
78 fill-column:99
79 End:
80 */
81 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :