Code

GSoC C++-ificiation merge and cleanup.
[inkscape.git] / src / display / nr-filter-component-transfer.h
1 #ifndef __NR_FILTER_COMPONENT_TRANSFER_H__
2 #define __NR_FILTER_COMPONENT_TRANSFER_H__
4 /*
5  * feComponentTransfer filter primitive renderer
6  *
7  * Authors:
8  *   Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org>
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 <vector>
20 namespace Inkscape {
21 namespace Filters {
23 enum FilterComponentTransferType {
24     COMPONENTTRANSFER_TYPE_IDENTITY,
25     COMPONENTTRANSFER_TYPE_TABLE,
26     COMPONENTTRANSFER_TYPE_DISCRETE,
27     COMPONENTTRANSFER_TYPE_LINEAR,
28     COMPONENTTRANSFER_TYPE_GAMMA,
29     COMPONENTTRANSFER_TYPE_ERROR
30 };
32 class FilterComponentTransfer : public FilterPrimitive {
33 public:
34     FilterComponentTransfer();
35     static FilterPrimitive *create();
36     virtual ~FilterComponentTransfer();
38     virtual int render(FilterSlot &slot, FilterUnits const &units);
39     virtual void area_enlarge(NRRectL &area, Geom::Matrix const &trans);
41     FilterComponentTransferType type[4];
42     std::vector<gdouble> tableValues[4];
43     double slope[4];
44     double intercept[4];
45     double amplitude[4];
46     double exponent[4];
47     double offset[4];
48 };
50 } /* namespace Filters */
51 } /* namespace Inkscape */
53 #endif /* __NR_FILTER_COMPONENT_TRANSFER_H__ */
54 /*
55   Local Variables:
56   mode:c++
57   c-file-style:"stroustrup"
58   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
59   indent-tabs-mode:nil
60   fill-column:99
61   End:
62 */
63 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :