summaryrefslogtreecommitdiffstats
path: root/src/util/preview.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/util/preview.h
parentInitial commit. (diff)
downloadinkscape-upstream/1.2.2.tar.xz
inkscape-upstream/1.2.2.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/util/preview.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/util/preview.h b/src/util/preview.h
new file mode 100644
index 0000000..36de1fc
--- /dev/null
+++ b/src/util/preview.h
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/**
+ * @file
+ * Utility functions for previewing icon representation.
+ */
+/* Authors:
+ * Jon A. Cruz
+ * Bob Jamison
+ * Other dudes from The Inkscape Organization
+ * Abhishek Sharma
+ * Anshudhar Kumar Singh <anshudhar2001@gmail.com>
+ *
+ * Copyright (C) 2004 Bob Jamison
+ * Copyright (C) 2005,2010 Jon A. Cruz
+ * Copyright (C) 2021 Anshudhar Kumar Singh
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#ifndef SP_PREVIEW_UTIL_H
+#define SP_PREVIEW_UTIL_H
+
+#include <glibmm/main.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#include "display/drawing.h"
+
+class SPDocument;
+class SPItem;
+
+namespace Inkscape {
+namespace UI {
+namespace PREVIEW {
+
+// takes doc, drawing, icon, and icon name to produce pixels
+GdkPixbuf *render_preview(SPDocument *doc, Inkscape::Drawing &drawing, SPItem *item,
+ unsigned width_in, unsigned height_in, Geom::OptRect *dboxIn = nullptr);
+
+} // namespace PREVIEW
+} // namespace UI
+} // namespace Inkscape
+
+#endif