From 38fcf14ef7489c2d8cd366cf02443891225e41af Mon Sep 17 00:00:00 2001 From: Felipe Corr??a da Silva Sanches Date: Mon, 11 Feb 2008 01:48:14 +0000 Subject: Offline work done during weekend: * handle fefuncR, fefuncG, fefuncB and fefuncA nodes * implement fecomponenttransfer renderer ** identity and gamma modes render perfectly ** linear and table modes are rendering with very slight imperfections This commit still mantains feComponentTransfer out of UI (still not implemented) (bzr r4704) --- src/sp-fecomponenttransfer-funcnode.h | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/sp-fecomponenttransfer-funcnode.h (limited to 'src/sp-fecomponenttransfer-funcnode.h') diff --git a/src/sp-fecomponenttransfer-funcnode.h b/src/sp-fecomponenttransfer-funcnode.h new file mode 100644 index 000000000..2f0b2fc28 --- /dev/null +++ b/src/sp-fecomponenttransfer-funcnode.h @@ -0,0 +1,72 @@ +#ifndef SP_FECOMPONENTTRANSFER_FUNCNODE_H_SEEN +#define SP_FECOMPONENTTRANSFER_FUNCNODE_H_SEEN + +/** \file + * SVG implementation, see sp-filter.cpp. + */ +/* + * Authors: + * Hugo Rodrigues + * Niko Kiirala + * Felipe CorrĂȘa da Silva Sanches + * + * Copyright (C) 2006,2007 Authors + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include "sp-object.h" +#include "display/nr-filter-component-transfer.h" + +#define SP_TYPE_FEFUNCR (sp_fefuncR_get_type()) +#define SP_TYPE_FEFUNCG (sp_fefuncG_get_type()) +#define SP_TYPE_FEFUNCB (sp_fefuncB_get_type()) +#define SP_TYPE_FEFUNCA (sp_fefuncA_get_type()) + +#define SP_IS_FEFUNCR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFUNCR)) +#define SP_IS_FEFUNCG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFUNCG)) +#define SP_IS_FEFUNCB(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFUNCB)) +#define SP_IS_FEFUNCA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_FEFUNCA)) + +#define SP_FEFUNCNODE(obj) (SP_IS_FEFUNCR(obj) ? G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_FEFUNCR, SPFeFuncNode) : (SP_IS_FEFUNCG(obj) ? G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_FEFUNCG, SPFeFuncNode) : (SP_IS_FEFUNCB(obj) ? G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_FEFUNCB, SPFeFuncNode):(SP_IS_FEFUNCA(obj) ? G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_FEFUNCA, SPFeFuncNode): NULL)))) + +#define SP_FEFUNCNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SP_TYPE_FEFUNCNODE, SPFeFuncNodeClass)) + +#define SP_IS_FEFUNCNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_FEFUNCNODE)) + +/* Component Transfer funcNode class */ + +class SPFeFuncNode; +class SPFeFuncNodeClass; + +struct SPFeFuncNode : public SPObject { + NR::FilterComponentTransferType type; + std::vector tableValues; + double slope; + double intercept; + double amplitude; + double exponent; + double offset; +}; + +struct SPFeFuncNodeClass { + SPObjectClass parent_class; +}; + +GType sp_fefuncR_get_type(); +GType sp_fefuncG_get_type(); +GType sp_fefuncB_get_type(); +GType sp_fefuncA_get_type(); + +#endif /* !SP_FECOMPONENTTRANSFER_FUNCNODE_H_SEEN */ + +/* + 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 : -- cgit v1.2.3