nr-filter-composite.cpp revision e874cb491fbb2e54741b9ee2434fcefa629796e5
/*
* feComposite filter effect renderer
*
* Authors:
* Niko Kiirala <niko@kiirala.com>
*
* Copyright (C) 2007 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <cmath>
#include "display/cairo-templates.h"
#include "display/cairo-utils.h"
#include "display/nr-filter-composite.h"
#include "display/nr-filter-slot.h"
#include "display/nr-filter-units.h"
namespace Inkscape {
namespace Filters {
{}
return new FilterComposite();
}
{}
struct ComposeArithmetic {
{}
ao = pxclamp(ao, 0, 255*255*255); // r, g and b are premultiplied, so should be clamped to the alpha channel
return pxout;
}
private:
};
{
// We may need to transform input surface to correct color interpolation space. The input surface
// might be used as input to another primitive but it is likely that all the primitives in a given
// filter use the same color interpolation space so we don't copy the input before converting.
if( _style ) {
}
if (op == COMPOSITE_ARITHMETIC) {
} else {
switch(op) {
case COMPOSITE_IN:
break;
case COMPOSITE_OUT:
break;
case COMPOSITE_ATOP:
break;
case COMPOSITE_XOR:
break;
#ifdef WITH_CSSCOMPOSITE
/* New CSS Operators */
case COMPOSITE_CLEAR:
break;
case COMPOSITE_COPY:
break;
case COMPOSITE_DESTINATION:
break;
break;
case COMPOSITE_DESTINATION_IN:
break;
break;
break;
case COMPOSITE_LIGHTER:
break;
#endif
case COMPOSITE_OVER:
case COMPOSITE_DEFAULT:
default:
// OVER is the default operator
break;
}
}
}
{
return true;
}
}
}
if (op == COMPOSITE_DEFAULT) {
this->op = COMPOSITE_OVER;
} else if (op != COMPOSITE_ENDOPERATOR) {
}
}
g_warning("Non-finite parameter for feComposite arithmetic operator");
return;
}
}
{
return 1.1;
}
} /* namespace Filters */
} /* namespace Inkscape */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :