-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file blur.cpp
** \brief Blur Implementation File
**
# include <config.h>
#endif
-#include <sinfg/general.h>
-#include <sinfg/surface.h>
+#include <synfig/general.h>
+#include <synfig/surface.h>
#include "blur.h"
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
return blurpos;
}
-Point Blur::operator ()(sinfg::Real x, sinfg::Real y) const
+Point Blur::operator ()(synfig::Real x, synfig::Real y) const
{
return (*this)(Point(x,y));
}
Surface worksurface(w,h);
- //sinfg::info("Blur: check surface = %s", surface_valid(surface)?"true":"false");
+ //synfig::info("Blur: check surface = %s", surface_valid(surface)?"true":"false");
// Premultiply the alpha
for(y=0;y<h;y++)
case Blur::BOX: // B O X -------------------------------------------------------
{
//horizontal part
- //sinfg::info("Blur: Starting Box blur (surface valid %d)", (int)surface_valid(worksurface));
+ //synfig::info("Blur: Starting Box blur (surface valid %d)", (int)surface_valid(worksurface));
Surface temp_surface;
temp_surface.set_wh(w,h);
int length = halfsizex;
length=std::max(1,length);
- //sinfg::info("Blur: hbox blur work -> temp %d", length);
+ //synfig::info("Blur: hbox blur work -> temp %d", length);
etl::hbox_blur(worksurface.begin(),worksurface.end(),length,temp_surface.begin());
}
else temp_surface = worksurface;
- //sinfg::info("Blur: hbox finished");
+ //synfig::info("Blur: hbox finished");
//vertical part
//Surface temp_surface2;
int length = halfsizey;
length = std::max(1,length);
- //sinfg::info("Blur: vbox blur temp -> work %d",length);
+ //synfig::info("Blur: vbox blur temp -> work %d",length);
etl::vbox_blur(temp_surface.begin(),temp_surface.end(),length,worksurface.begin());
}
else worksurface = temp_surface;
- //sinfg::info("Blur: vbox finished");
+ //synfig::info("Blur: vbox finished");
//blend with the original surface
/*int x,y;
Surface temp_surface;
Surface *gauss_surface;
- //sinfg::warning("Didn't crash yet b1");
+ //synfig::warning("Didn't crash yet b1");
//if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT)
gauss_surface = &worksurface;
memset(SC0,0,(w+2)*sizeof(Color));
memset(SC0,0,(w+2)*sizeof(Color));
- //sinfg::warning("Didn't crash yet b2");
+ //synfig::warning("Didn't crash yet b2");
//int i = 0;
while(bw&&bh)
bw--,bh--;
}
- //sinfg::warning("Didn't crash yet bi - %d",i++);
+ //synfig::warning("Didn't crash yet bi - %d",i++);
}
while(bw)
{
GuassianBlur_2x1(*gauss_surface);
bw--;
}
- //sinfg::warning("Didn't crash yet bi - %d",i++);
+ //synfig::warning("Didn't crash yet bi - %d",i++);
}
while(bh)
{
GuassianBlur_1x2(*gauss_surface);
bh--;
}
- //sinfg::warning("Didn't crash yet bi - %d",i++);
+ //synfig::warning("Didn't crash yet bi - %d",i++);
}
delete [] SC0;
for(x=0;x<renddesc.get_w();x++)
worksurface[y][x]=Color::blend(temp_surface[y][x],worksurface[y][x],get_amount(),get_blend_method());
}*/
- //sinfg::warning("Didn't crash yet b end",i++);
+ //synfig::warning("Didn't crash yet b end",i++);
}
break;