1 #ifndef __NR_FILTER_IMAGE_H__
2 #define __NR_FILTER_IMAGE_H__
4 /*
5 * feImage filter primitive renderer
6 *
7 * Authors:
8 * Niko Kiirala <niko@kiirala.com>
9 *
10 * Copyright (C) 2007 authors
11 *
12 * Released under GNU GPL, read the file 'COPYING' for more information
13 */
15 #include "display/nr-filter-primitive.h"
16 #include "display/nr-filter-slot.h"
17 #include "display/nr-filter-units.h"
18 #include <gtkmm.h>
19 #include "sp-item.h"
21 namespace NR {
23 class FilterImage : public FilterPrimitive {
24 public:
25 FilterImage();
26 static FilterPrimitive *create();
27 virtual ~FilterImage();
29 virtual int render(FilterSlot &slot, FilterUnits const &units);
30 virtual FilterTraits get_input_traits();
31 void set_document( SPDocument *document );
32 void set_href(const gchar *href);
33 void set_region(SVGLength x, SVGLength y, SVGLength width, SVGLength height);
34 bool from_element;
35 SPItem* SVGElem;
37 private:
38 SPDocument *document;
39 gchar *feImageHref;
40 guint8* image_pixbuf;
41 Glib::RefPtr<Gdk::Pixbuf> image;
42 int width, height, rowstride;
43 float feImageX,feImageY,feImageWidth,feImageHeight;
44 };
46 } /* namespace NR */
48 #endif /* __NR_FILTER_IMAGE_H__ */
49 /*
50 Local Variables:
51 mode:c++
52 c-file-style:"stroustrup"
53 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
54 indent-tabs-mode:nil
55 fill-column:99
56 End:
57 */
58 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :