summaryrefslogtreecommitdiffstats
path: root/src/object/sp-dimensions.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /src/object/sp-dimensions.h
parentInitial commit. (diff)
downloadinkscape-upstream.tar.xz
inkscape-upstream.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/object/sp-dimensions.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/object/sp-dimensions.h b/src/object/sp-dimensions.h
new file mode 100644
index 0000000..337b6d1
--- /dev/null
+++ b/src/object/sp-dimensions.h
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+#ifndef SP_DIMENSIONS_H__
+#define SP_DIMENSIONS_H__
+
+/*
+ * dimensions helper class, common code used by root, image and others
+ *
+ * Authors:
+ * Shlomi Fish
+ * Copyright (C) 2017 Shlomi Fish, authors
+ *
+ * Released under dual Expat and GNU GPL, read the file 'COPYING' for more information
+ *
+ */
+
+#include "svg/svg-length.h"
+
+namespace Inkscape::XML {
+class Node;
+} // namespace Inkscape::XML
+
+class SPItemCtx;
+
+class SPDimensions {
+
+public:
+ SVGLength x;
+ SVGLength y;
+ SVGLength width;
+ SVGLength height;
+ void calcDimsFromParentViewport(const SPItemCtx *ictx, bool assign_to_set = false,
+ SPDimensions const *use = nullptr);
+ void writeDimensions(Inkscape::XML::Node *) const;
+};
+
+#endif
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-basic-offset:2
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=2:tabstop=8:softtabstop=2:fileencoding=utf-8:textwidth=99 :