1 /* === S Y N F I G ========================================================= */
2 /*! \file synfig/blur.h
3 ** \brief Blur Helper Header file
5 ** $Id: blur.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_BLUR_HELPER_H
26 #define __SYNFIG_BLUR_HELPER_H
28 /* === H E A D E R S ======================================================= */
29 #include <synfig/surface.h>
30 #include <synfig/color.h>
31 #include <synfig/vector.h>
33 /* === M A C R O S ========================================================= */
35 /* === T Y P E D E F S ===================================================== */
37 /* === C L A S S E S & S T R U C T S ======================================= */
38 class synfig::ProgressCallback;
51 FORCE_DWORD = 0x8fffffff
58 synfig::ProgressCallback *cb;
61 synfig::Point & set_size(const synfig::Point &v) { return (size = v); }
62 const synfig::Point & get_size() const { return size; }
63 synfig::Point & get_size() { return size; }
65 int & set_type(const int &t) { return (type = t); }
66 const int & get_type() const { return type; }
67 int & get_type() { return type; }
70 Blur(const synfig::Point &s, int t, synfig::ProgressCallback *callb=0):size(s), type(t), cb(callb) {}
71 Blur(synfig::Real sx, synfig::Real sy, int t, synfig::ProgressCallback *callb = 0): size(sx,sy), type(t), cb(callb) {}
74 synfig::Point operator ()(const synfig::Point &p) const;
75 synfig::Point operator ()(synfig::Real x, synfig::Real y) const;
78 // input surface can be the same as output surface,
79 // though both have to be the same size
80 bool operator ()(const synfig::Surface &surface, const synfig::Vector &resolution, synfig::Surface &out) const;
82 bool operator ()(const etl::surface<float> &surface, const synfig::Vector &resolution, etl::surface<float> &out) const;
83 //bool operator ()(const etl::surface<unsigned char> &surface, const synfig::Vector &resolution, etl::surface<unsigned char> &out) const;
86 /* === E N D =============================================================== */