~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/filters/convolvematrix.h

  • Committer: Ted Gould
  • Date: 2008-11-21 05:24:08 UTC
  • Revision ID: ted@canonical.com-20081121052408-tilucis2pjrrpzxx
Merge from fe-moved

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef SP_FECONVOLVEMATRIX_H_SEEN
 
2
#define SP_FECONVOLVEMATRIX_H_SEEN
 
3
 
 
4
/** \file
 
5
 * SVG <feConvolveMatrix> implementation, see ConvolveMatrix.cpp.
 
6
 */
 
7
/*
 
8
 * Authors:
 
9
 *   Felipe Corrêa da Silva Sanches <felipe.sanches@gmail.com>
 
10
 *   Hugo Rodrigues <haa.rodrigues@gmail.com>
 
11
 *
 
12
 * Copyright (C) 2006 Hugo Rodrigues
 
13
 *
 
14
 * Released under GNU GPL, read the file 'COPYING' for more information
 
15
 */
 
16
 
 
17
#include "sp-filter.h"
 
18
#include "convolvematrix-fns.h"
 
19
#include "number-opt-number.h"
 
20
#include "display/nr-filter-convolve-matrix.h"
 
21
#include <vector>
 
22
 
 
23
/* FeConvolveMatrix base class */
 
24
class SPFeConvolveMatrixClass;
 
25
 
 
26
struct SPFeConvolveMatrix : public SPFilterPrimitive {
 
27
    /* CONVOLVEMATRIX ATTRIBUTES */
 
28
    NumberOptNumber order;
 
29
    std::vector<gdouble> kernelMatrix;
 
30
    double divisor, bias;
 
31
    int targetX, targetY;
 
32
    NR::FilterConvolveMatrixEdgeMode edgeMode;
 
33
    NumberOptNumber kernelUnitLength;
 
34
    bool preserveAlpha;
 
35
    //some helper variables:
 
36
    bool targetXIsSet;
 
37
    bool targetYIsSet;
 
38
    bool divisorIsSet;
 
39
    bool kernelMatrixIsSet;
 
40
};
 
41
 
 
42
struct SPFeConvolveMatrixClass {
 
43
    SPFilterPrimitiveClass parent_class;
 
44
};
 
45
 
 
46
GType sp_feConvolveMatrix_get_type();
 
47
 
 
48
 
 
49
#endif /* !SP_FECONVOLVEMATRIX_H_SEEN */
 
50
 
 
51
/*
 
52
  Local Variables:
 
53
  mode:c++
 
54
  c-file-style:"stroustrup"
 
55
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
56
  indent-tabs-mode:nil
 
57
  fill-column:99
 
58
  End:
 
59
*/
 
60
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :