1 #ifndef __SVG_PREVIEW_CACHE_H__
2 #define __SVG_PREVIEW_CACHE_H__
4 /** \file
5 * SPIcon: Generic icon widget
6 */
7 /*
8 * Copyright (C) 2007 Bryce W. Harrington <bryce@bryceharrington.org>
9 *
10 * Released under GNU GPL, read the file 'COPYING' for more information
11 *
12 */
14 GdkPixbuf* render_pixbuf(NRArenaItem* root, double scale_factor, const Geom::Rect& dbox, unsigned psize);
16 namespace Inkscape {
17 namespace UI {
18 namespace Cache {
20 class SvgPreview {
21 protected:
22 std::map<Glib::ustring, GdkPixbuf*> _pixmap_cache;
24 public:
25 SvgPreview();
26 ~SvgPreview();
28 Glib::ustring cache_key(gchar const *uri, gchar const *name, unsigned psize) const;
29 GdkPixbuf* get_preview_from_cache(const Glib::ustring& key);
30 void set_preview_in_cache(const Glib::ustring& key, GdkPixbuf* px);
31 GdkPixbuf* get_preview(const gchar* uri, const gchar* id, NRArenaItem *root, double scale_factor, unsigned int psize);
32 };
34 }; // namespace Cache
35 }; // namespace UI
36 }; // namespace Inkscape
40 #endif // __SVG_PREVIEW_CACHE_H__
41 /*
42 Local Variables:
43 mode:c++
44 c-file-style:"stroustrup"
45 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
46 indent-tabs-mode:nil
47 fill-column:99
48 End:
49 */
50 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :