/* === S Y N F I G ========================================================= */
/*! \file layer_shape.cpp
-** \brief Template Header
+** \brief Implementation of the "Shape" layer
**
** $Id$
**
bool
Layer_Shape::set_param(const String & param, const ValueBase &value)
{
- IMPORT(color);
+ IMPORT_PLUS(color, { if (color.get_a() == 0) if (converted_blend_) {
+ set_blend_method(Color::BLEND_ALPHA_OVER);
+ color.set_a(1); } else transparent_color_ = true; });
IMPORT(offset);
IMPORT(invert);
IMPORT(antialias);
//************** SCANLINE RENDERING *********************
void Layer_Shape::PolySpan::line_to(Real x, Real y)
{
- Real n[4];
+ Real n[4] = {0,0,0,0};
bool afterx = false;
const Real xin(x), yin(y);
Rect nrect;
- Real pixelfeatherx = abs(feather/pw),
- pixelfeathery = abs(feather/ph);
+ Real pixelfeatherx = quality == 10 ? 0 : abs(feather/pw),
+ pixelfeathery = quality == 10 ? 0 : abs(feather/ph);
nrect.set_point((aabb.minx - tl[0])/pw,(aabb.miny - tl[1])/ph);
nrect.expand((aabb.maxx - tl[0])/pw,(aabb.maxy - tl[1])/ph);
if(cb && !cb->amount_complete(10000,10001+renddesc.get_h())) return false;
- if(feather)
+ if(feather && quality != 10)
{
//we have to blur rather than be crappy
}
bool
-Layer_Shape::render_shape(surface<float> *surface,int /*quality*/,
+Layer_Shape::render_shape(etl::surface<float> *surface,int /*quality*/,
const RendDesc &renddesc, ProgressCallback */*cb*/)const
{
// If our amount is set to zero, no need to render anything