1 /* === S Y N F I G ========================================================= */
2 /*! \file synfig/blur.h
3 ** \brief Blur Helper Header file
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 ======================================= */
39 class ProgressCallback;
53 FORCE_DWORD = 0x8fffffff
60 synfig::ProgressCallback *cb;
63 synfig::Point & set_size(const synfig::Point &v) { return (size = v); }
64 const synfig::Point & get_size() const { return size; }
65 synfig::Point & get_size() { return size; }
67 int & set_type(const int &t) { return (type = t); }
68 const int & get_type() const { return type; }
69 int & get_type() { return type; }
72 Blur(const synfig::Point &s, int t, synfig::ProgressCallback *callb=0):size(s), type(t), cb(callb) {}
73 Blur(synfig::Real sx, synfig::Real sy, int t, synfig::ProgressCallback *callb = 0): size(sx,sy), type(t), cb(callb) {}
76 synfig::Point operator()(const synfig::Point &p) const;
77 synfig::Point operator()(synfig::Real x, synfig::Real y) const;
80 // input surface can be the same as output surface,
81 // though both have to be the same size
82 bool operator()(const synfig::Surface &surface, const synfig::Vector &resolution, synfig::Surface &out) const;
84 bool operator()(const etl::surface<float> &surface, const synfig::Vector &resolution, etl::surface<float> &out) const;
85 //bool operator()(const etl::surface<unsigned char> &surface, const synfig::Vector &resolution, etl::surface<unsigned char> &out) const;
88 /* === E N D =============================================================== */