sp-filter.cpp revision f727367dddbf050f0a7d33757e9290f571cbd492
#define __SP_FILTER_CPP__
/** \file
* SVG <filter> implementation.
*/
/*
* Authors:
* Hugo Rodrigues <haa.rodrigues@gmail.com>
* Niko Kiirala <niko@kiirala.com>
*
* 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 "document.h"
#include "sp-filter.h"
#include "sp-filter-reference.h"
#include "uri.h"
#define SP_MACROS_SILENT
#include "macros.h"
#include "display/nr-filter.cpp"
/* Filter base class */
static Inkscape::XML::Node *sp_filter_write(SPObject *object, Inkscape::XML::Node *repr, guint flags);
static SPObjectClass *filter_parent_class;
{
static GType filter_type = 0;
if (!filter_type) {
GTypeInfo filter_info = {
sizeof(SPFilterClass),
sizeof(SPFilter),
16,
NULL, /* value_table */
};
}
return filter_type;
}
static void
{
}
static void
{
filter->x = 0;
filter->y = 0;
}
/**
* Reads the Inkscape::XML::Node, and initializes SPFilter 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
{
}
//Read values of key attributes from XML nodes into object.
//is this necessary?
}
/**
* Drops any allocated memory.
*/
static void
{
if (SP_OBJECT_DOCUMENT(object)) {
/* Unregister ourselves */
}
//TODO: release resources here
//release href
}
}
}
/**
* Sets a specific value in the SPFilter.
*/
static void
{
switch (key) {
case SP_ATTR_FILTERUNITS:
if (value) {
} else {
}
} else {
}
break;
case SP_ATTR_PRIMITIVEUNITS:
if (value) {
} else {
}
} else {
}
break;
case SP_ATTR_X:
break;
case SP_ATTR_Y:
break;
case SP_ATTR_WIDTH:
break;
case SP_ATTR_HEIGHT:
break;
case SP_ATTR_FILTERRES:
break;
case SP_ATTR_XLINK_HREF:
if (value) {
try {
} catch (Inkscape::BadURIException &e) {
}
} else {
}
break;
default:
// See if any parents need this value.
}
break;
}
}
/**
* Receives update notifications.
*/
static void
{
//SPFilter *filter = SP_FILTER(object);
/* do something to trigger redisplay, updates? */
}
}
}
/**
* Writes its settings to an incoming repr object, if any.
*/
{
if (!repr) {
}
switch (filter->filterUnits) {
break;
default:
break;
}
}
switch (filter->primitiveUnits) {
break;
default:
break;
}
}
} else {
}
} else {
}
} else {
}
} else {
}
} else {
}
}
}
return repr;
}
/**
* Gets called when the filter is (re)attached to another filter.
*/
static void
{
if (old_ref) {
}
if ( SP_IS_FILTER(ref)
{
//g_signal_connect(G_OBJECT(ref), "modified", G_CALLBACK(filter_ref_modified), filter);
}
}
static void
{
}
for (int i = 0 ; i < filter->_primitive_count ; i++) {
}
}
delete[] filter->_primitives;
}
{
}
return primitive;
}
/**
* Callback for child_added event.
*/
static void
{/*
SPFilter *f = SP_FILTER(object);
if (((SPObjectClass *) filter_parent_class)->child_added)
(* ((SPObjectClass *) filter_parent_class)->child_added)(object, child, ref);
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
*/
}
/**
* Callback for remove_child event.
*/
static void
{/*
SPFilter *f = SP_FILTER(object);
if (((SPObjectClass *) filter_parent_class)->remove_child)
(* ((SPObjectClass *) filter_parent_class)->remove_child)(object, child);
SPObject *ochild;
object->requestModified(SP_OBJECT_MODIFIED_FLAG);
*/
}
{
for (int i = 0 ; i < sp_filter->_primitive_count ; i++) {
} else {
g_warning("Cannot build filter renderer: missing builder");
}
}
}
return filter->_primitive_count;
}
/*
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:encoding=utf-8:textwidth=99 :