sp-filter.cpp revision e7a2b63dd05c88adcac422aedc11fed284640bed
#define __SP_FILTER_CPP__
/** \file
* SVG <filter> implementation.
*/
/*
* Authors:
* Hugo Rodrigues <haa.rodrigues@gmail.com>
*
* Copyright (C) 2006 Hugo Rodrigues
*
* 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"
/*
* For debugging purposes only
*/
{
g_print("filterUnits=SP_FILTER_UNITS_USERSPACEONUSE\n");
g_print("filterUnits=SP_FILTER_UNITS_OBJECTBOUNDINGBOX\n");
else
g_print("filterUnits=UNKNOWN!!!\n");
g_print("primitiveUnits=SP_FILTER_UNITS_USERSPACEONUSE\n");
g_print("primitiveUnits=SP_FILTER_UNITS_OBJECTBOUNDINGBOX\n");
else
g_print("primitiveUnits=UNKNOWN!!!\n");
//TODO: print X, Y, W and H units
}
/* 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 {
}
char filterRes[32];
} 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
{
}
/*
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 :