~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/display/nr-filter-image.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __NR_FILTER_IMAGE_H__
 
2
#define __NR_FILTER_IMAGE_H__
 
3
 
 
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
 */
 
14
 
 
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"
 
20
 
 
21
namespace Inkscape {
 
22
namespace Filters {
 
23
 
 
24
class FilterImage : public FilterPrimitive {
 
25
public:
 
26
    FilterImage();
 
27
    static FilterPrimitive *create();
 
28
    virtual ~FilterImage();
 
29
 
 
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;
 
37
 
 
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
};
 
47
 
 
48
} /* namespace Filters */
 
49
} /* namespace Inkscape */
 
50
 
 
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:encoding=utf-8:textwidth=99 :