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