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

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/sp-filter.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 SP_FILTER_H_SEEN
 
2
#define SP_FILTER_H_SEEN
 
3
 
 
4
/** \file
 
5
 * SVG <filter> implementation, see sp-filter.cpp.
 
6
 */
 
7
/*
 
8
 * Authors:
 
9
 *   Hugo Rodrigues <haa.rodrigues@gmail.com>
 
10
 *   Niko Kiirala <niko@kiirala.com>
 
11
 *
 
12
 * Copyright (C) 2006,2007 Authors
 
13
 *
 
14
 * Released under GNU GPL, read the file 'COPYING' for more information
 
15
 */
 
16
 
 
17
#include <map>
 
18
 
 
19
#include <gtkmm.h>
 
20
 
 
21
#include "number-opt-number.h"
 
22
#include "sp-object.h"
 
23
#include "sp-filter-units.h"
 
24
#include "sp-filter-fns.h"
 
25
#include "svg/svg-length.h"
 
26
#include "display/nr-filter.h"
 
27
 
 
28
/* Filter base class */
 
29
 
 
30
/* MACROS DEFINED IN FILE sp-filter-fns.h */
 
31
 
 
32
struct SPFilterReference;
 
33
 
 
34
class SPFilter;
 
35
class SPFilterClass;
 
36
 
 
37
struct ltstr {
 
38
    bool operator()(const char* s1, const char* s2) const;
 
39
};
 
40
 
 
41
struct SPFilter : public SPObject {
 
42
 
 
43
    /** filterUnits attribute */
 
44
    SPFilterUnits filterUnits;
 
45
    guint filterUnits_set : 1;
 
46
    /** primitiveUnits attribute */
 
47
    SPFilterUnits primitiveUnits;
 
48
    guint primitiveUnits_set : 1;
 
49
    /** X attribute */    
 
50
    SVGLength x;
 
51
    /** Y attribute */
 
52
    SVGLength y;
 
53
    /** WIDTH attribute */
 
54
    SVGLength width;
 
55
    /** HEIGHT attribute */
 
56
    SVGLength height;
 
57
    /** FILTERRES attribute */
 
58
    NumberOptNumber filterRes;
 
59
    /** HREF attribute */
 
60
    SPFilterReference *href;
 
61
    sigc::connection modified_connection;
 
62
 
 
63
    Inkscape::Filters::Filter *_renderer;
 
64
 
 
65
    std::map<gchar *, int, ltstr>* _image_name;
 
66
    int _image_number_next;
 
67
};
 
68
 
 
69
struct SPFilterClass {
 
70
    SPObjectClass parent_class;
 
71
};
 
72
 
 
73
/*
 
74
 * Initializes the given Inkscape::Filters::Filter object as a renderer for this
 
75
 * SPFilter object.
 
76
 */
 
77
void sp_filter_build_renderer(SPFilter *sp_filter, Inkscape::Filters::Filter *nr_filter);
 
78
 
 
79
/*
 
80
 * Returns the number of filter primitives in this SPFilter object.
 
81
 */
 
82
int sp_filter_primitive_count(SPFilter *filter);
 
83
 
 
84
/**
 
85
 * Returns a slot number for given image name, or -1 for unknown name.
 
86
 */
 
87
int sp_filter_get_image_name(SPFilter *filter, gchar const *name);
 
88
/**
 
89
 * Returns slot number for given image name, even if it's unknown.
 
90
 */
 
91
int sp_filter_set_image_name(SPFilter *filter, gchar const *name);
 
92
/**
 
93
 * Finds image name based on it's slot number. Returns 0 for unknown slot
 
94
 * numbers.
 
95
 */
 
96
gchar const *sp_filter_name_for_image(SPFilter const *filter, int const image);
 
97
 
 
98
/*
 
99
 * Returns a result image name that is not in use inside this filter.
 
100
 */
 
101
Glib::ustring sp_filter_get_new_result_name(SPFilter *filter);
 
102
 
 
103
#endif /* !SP_FILTER_H_SEEN */
 
104
 
 
105
/*
 
106
  Local Variables:
 
107
  mode:c++
 
108
  c-file-style:"stroustrup"
 
109
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
110
  indent-tabs-mode:nil
 
111
  fill-column:99
 
112
  End:
 
113
*/
 
114
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :