/*
* A container class for filter slots. Allows for simple getting and
* setting images in filter slots without having to bother with
* table indexes and such.
*
* Author:
* Niko Kiirala <niko@kiirala.com>
*
* Copyright (C) 2006,2007 Niko Kiirala
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <assert.h>
#include <string.h>
#include "display/cairo-utils.h"
#include "display/drawing-context.h"
#include "display/nr-filter-types.h"
#include "display/nr-filter-gaussian.h"
#include "display/nr-filter-slot.h"
#include "display/nr-filter-units.h"
namespace Inkscape {
namespace Filters {
, _units(u)
{
using Geom::X;
using Geom::Y;
// compute slot bbox
if (trans.isTranslation()) {
} else {
}
}
FilterSlot::~FilterSlot()
{
}
}
{
if (slot_nr == NR_FILTER_SLOT_NOT_SET)
/* If we didn't have the specified image, but we could create it
* from the other information we have, let's do that */
&& (slot_nr == NR_FILTER_SOURCEGRAPHIC
|| slot_nr == NR_FILTER_SOURCEALPHA
|| slot_nr == NR_FILTER_FILLPAINT
|| slot_nr == NR_FILTER_STROKEPAINT))
{
switch (slot_nr) {
case NR_FILTER_SOURCEGRAPHIC: {
// Assume all source graphics are sRGB
} break;
case NR_FILTER_BACKGROUNDIMAGE: {
// Assume all backgrounds are sRGB
} break;
case NR_FILTER_SOURCEALPHA: {
} break;
case NR_FILTER_BACKGROUNDALPHA: {
} break;
case NR_FILTER_FILLPAINT: //TODO
case NR_FILTER_STROKEPAINT: //TODO
default:
break;
}
}
// create empty surface
}
return s->second;
}
{
if (trans.isTranslation()) {
return _source_graphic;
}
return tsg;
}
{
if (_background_ct) {
} else {
}
return tbg;
}
{
if (trans.isIdentity()) {
return result;
}
copy_cairo_surface_ci( result, r );
return r;
}
{
// destroy after referencing
// this way assigning a surface to a slot it already occupies will not cause errors
}
}
{
if (slot_nr == NR_FILTER_SLOT_NOT_SET)
}
{
if (slot_nr == NR_FILTER_SLOT_NOT_SET)
}
{
if (slot_nr == NR_FILTER_SLOT_NOT_SET)
if (s == _primitiveAreas.end()) {
return *(_units.get_filter_area());
}
return s->second;
}
{
}
filterquality = q;
}
blurquality = q;
}
return blurquality;
}
return r;
}
} /* 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 :