gaussian-blur.cpp revision 4c0ce26a3d50888ea326789170588360b784e935
/** \file
* SVG <gaussianBlur> implementation.
*
*/
/*
* Authors:
* Hugo Rodrigues <haa.rodrigues@gmail.com>
* Niko Kiirala <niko@kiirala.com>
* Abhishek Sharma
*
* Copyright (C) 2006,2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "attributes.h"
#include "filters/gaussian-blur.h"
#include "display/nr-filter.h"
#include "display/nr-filter-primitive.h"
#include "display/nr-filter-gaussian.h"
#include "display/nr-filter-types.h"
//#define SP_MACROS_SILENT
//#include "macros.h"
/* GaussianBlur base class */
static void sp_gaussianBlur_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static Inkscape::XML::Node *sp_gaussianBlur_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_gaussianBlur_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter);
{
static GType gaussianBlur_type = 0;
if (!gaussianBlur_type) {
sizeof(SPGaussianBlurClass),
sizeof(SPGaussianBlur),
16,
NULL, /* value_table */
};
gaussianBlur_type = g_type_register_static(SP_TYPE_FILTER_PRIMITIVE, "SPGaussianBlur", &gaussianBlur_info, (GTypeFlags)0);
}
return gaussianBlur_type;
}
static void
{
//sp_object_class->build = sp_gaussianBlur_build;
}
static void
{
}
/**
* Reads the Inkscape::XML::Node, and initializes SPGaussianBlur variables. For this to get called,
* our name must be associated with a repr via "sp_object_type_register". Best done through
* sp-object-repr.cpp's repr_name_entries array.
*/
static void
{
// if (((SPObjectClass *) gaussianBlur_parent_class)->build) {
// ((SPObjectClass *) gaussianBlur_parent_class)->build(object, document, repr);
// }
// CPPIFY: todo
}
/**
* Drops any allocated memory.
*/
static void
{
}
/**
* Sets a specific value in the SPGaussianBlur.
*/
static void
{
switch(key) {
case SP_ATTR_STDDEVIATION:
break;
default:
break;
}
}
/**
* Receives update notifications.
*/
static void
{
if (flags & SP_OBJECT_MODIFIED_FLAG) {
}
}
}
/**
* Writes its settings to an incoming repr object, if any.
*/
sp_gaussianBlur_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
{
/* TODO: Don't just clone, but create a new repr node and write all
* relevant values into it */
if (!repr) {
}
}
return repr;
}
{
}
{
}
static void sp_gaussianBlur_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
Inkscape::Filters::FilterGaussian *nr_blur = dynamic_cast<Inkscape::Filters::FilterGaussian*>(nr_primitive);
if (num >= 0.0) {
if(optnum >= 0.0)
else
}
}
/*
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 :