Code

Merge from trunk.
[inkscape.git] / src / display / nr-filter-image.h
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 Inkscape {
22 namespace Filters {
24 class FilterImage : public FilterPrimitive {
25 public:
26     FilterImage();
27     static FilterPrimitive *create();
28     virtual ~FilterImage();
30     virtual int render(FilterSlot &slot, FilterUnits const &units);
31     virtual FilterTraits get_input_traits();
32     void set_document( SPDocument *document );
33     void set_href(const gchar *href);
34     void set_region(SVGLength x, SVGLength y, SVGLength width, SVGLength height);
35     bool from_element;
36     SPItem* SVGElem;
38 private:
39     SPDocument *document;
40     gchar *feImageHref;
41     guint8* image_pixbuf;
42     Glib::RefPtr<Gdk::Pixbuf> image;
43     int width, height, rowstride;
44     float feImageX,feImageY,feImageWidth,feImageHeight;
45     bool has_alpha;
46 };
48 } /* namespace Filters */
49 } /* namespace Inkscape */
51 #endif /* __NR_FILTER_IMAGE_H__ */
52 /*
53   Local Variables:
54   mode:c++
55   c-file-style:"stroustrup"
56   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
57   indent-tabs-mode:nil
58   fill-column:99
59   End:
60 */
61 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :