Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
preview.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
6/* Authors:
7 * Jon A. Cruz
8 * Bob Jamison
9 * Other dudes from The Inkscape Organization
10 * Abhishek Sharma
11 * Anshudhar Kumar Singh <anshudhar2001@gmail.com>
12 *
13 * Copyright (C) 2004 Bob Jamison
14 * Copyright (C) 2005,2010 Jon A. Cruz
15 * Copyright (C) 2021 Anshudhar Kumar Singh
16 *
17 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
18 */
19
20#ifndef INKSCAPE_UTIL_PREVIEW_H
21#define INKSCAPE_UTIL_PREVIEW_H
22
23#include <cstdint>
24#include <cairomm/surface.h>
25
26#include "display/drawing.h"
27#include "async/channel.h"
28
29class SPDocument;
30class SPItem;
31
32namespace Inkscape {
33namespace UI {
34namespace Preview {
35
55Cairo::RefPtr<Cairo::ImageSurface>
56render_preview(SPDocument *doc, std::shared_ptr<Inkscape::Drawing> drawing, uint32_t bg_color, Inkscape::DrawingItem *item,
57 unsigned width_in, unsigned height_in, Geom::Rect const &dboxIn);
58
59} // namespace Preview
60} // namespace UI
61} // namespace Inkscape
62
63#endif // INKSCAPE_UTIL_PREVIEW_H
Axis aligned, non-empty rectangle.
Definition rect.h:92
SVG drawing item for display.
Typed SVG document implementation.
Definition document.h:101
Base class for visual SVG elements.
Definition sp-item.h:109
SVG drawing for display.
SPItem * item
Cairo::RefPtr< Cairo::ImageSurface > render_preview(SPDocument *doc, std::shared_ptr< Inkscape::Drawing > drawing, uint32_t bg, Inkscape::DrawingItem *item, unsigned width_in, unsigned height_in, Geom::Rect const &dboxIn)
Launch a background task to render a drawing to a surface.
Definition preview.cpp:26
Helper class to stream background task notifications as a series of messages.