**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
/* === G L O B A L S ======================================================= */
SYNFIG_LAYER_INIT(Layer_SolidColor);
/* === G L O B A L S ======================================================= */
SYNFIG_LAYER_INIT(Layer_SolidColor);
SYNFIG_LAYER_SET_LOCAL_NAME(Layer_SolidColor,_("Solid Color"));
SYNFIG_LAYER_SET_CATEGORY(Layer_SolidColor,_("Geometry"));
SYNFIG_LAYER_SET_VERSION(Layer_SolidColor,"0.1");
SYNFIG_LAYER_SET_LOCAL_NAME(Layer_SolidColor,_("Solid Color"));
SYNFIG_LAYER_SET_CATEGORY(Layer_SolidColor,_("Geometry"));
SYNFIG_LAYER_SET_VERSION(Layer_SolidColor,"0.1");
else
if(get_blend_method()==Color::BLEND_COMPOSITE && get_amount()*color.get_a()>=0.5)
return const_cast<Layer_SolidColor*>(this);
else
if(get_blend_method()==Color::BLEND_COMPOSITE && get_amount()*color.get_a()>=0.5)
return const_cast<Layer_SolidColor*>(this);
else
return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method());
}
else
return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method());
}
bool
Layer_SolidColor::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const
{
bool
Layer_SolidColor::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const
{
// Mark our progress as starting
if(cb && !cb->amount_complete(0,1000))
return false;
// Mark our progress as starting
if(cb && !cb->amount_complete(0,1000))
return false;