blend.cpp revision ce31c2a2937dddb2eb4fd13b2cf8679882038d29
#define __SP_FEBLEND_CPP__
/** \file
* SVG <feBlend> 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 <string.h>
#include "attributes.h"
#include "blend.h"
#include "display/nr-filter.h"
#include "display/nr-filter-primitive.h"
#include "display/nr-filter-blend.h"
#include "display/nr-filter-types.h"
/* FeBlend base class */
static Inkscape::XML::Node *sp_feBlend_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void sp_feBlend_build_renderer(SPFilterPrimitive *sp_prim, Inkscape::Filters::Filter *filter);
{
static GType feBlend_type = 0;
if (!feBlend_type) {
sizeof(SPFeBlendClass),
sizeof(SPFeBlend),
16,
NULL, /* value_table */
};
feBlend_type = g_type_register_static(SP_TYPE_FILTER_PRIMITIVE, "SPFeBlend", &feBlend_info, (GTypeFlags)0);
}
return feBlend_type;
}
static void
{
}
static void
{
}
/**
* Reads the Inkscape::XML::Node, and initializes SPFeBlend 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
{
}
/*LOAD ATTRIBUTES FROM REPR HERE*/
/* Unlike normal in, in2 is required attribute. Make sure, we can call
* it by some name. */
{
}
}
/**
* Drops any allocated memory.
*/
static void
{
}
{
switch (value[0]) {
case 'n':
break;
case 'm':
break;
case 's':
break;
case 'd':
break;
case 'l':
break;
default:
// do nothing by default
break;
}
}
/**
* Sets a specific value in the SPFeBlend.
*/
static void
{
(void)feBlend;
int input;
switch(key) {
/*DEAL WITH SETTING ATTRIBUTES HERE*/
case SP_ATTR_MODE:
}
break;
case SP_ATTR_IN2:
}
break;
default:
break;
}
}
/**
* Receives update notifications.
*/
static void
{
if (flags & SP_OBJECT_MODIFIED_FLAG) {
}
/* Unlike normal in, in2 is required attribute. Make sure, we can call
* it by some name. */
{
}
}
}
/**
* Writes its settings to an incoming repr object, if any.
*/
sp_feBlend_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
{
if (!repr) {
}
if (out_name) {
} else {
if (!out_name) {
g_warning("Unable to set in2 for feBlend");
}
}
char const *mode;
switch(blend->blend_mode) {
mode = "normal"; break;
mode = "multiply"; break;
mode = "screen"; break;
mode = "darken"; break;
mode = "lighten"; break;
default:
mode = 0;
}
}
return repr;
}
static void sp_feBlend_build_renderer(SPFilterPrimitive *primitive, Inkscape::Filters::Filter *filter) {
Inkscape::Filters::FilterBlend *nr_blend = dynamic_cast<Inkscape::Filters::FilterBlend*>(nr_primitive);
}
/*
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 :