001package com.hfg.svg.filtereffect;
002
003import com.hfg.svg.SVG;
004import com.hfg.svg.SvgAttr;
005import com.hfg.util.collection.CollectionUtil;
006import com.hfg.xml.XMLAttribute;
007import com.hfg.xml.XMLTag;
008
009//------------------------------------------------------------------------------
010/**
011 Object representation of an SVG (Scalable Vector Graphics) 'feFuncR' filter effect tag.
012
013 From <a href='http://www.w3.org/TR/2003/REC-SVG11-20030114/filters.html#feComponentTransfer'>
014 http://www.w3.org/TR/2003/REC-SVG11-20030114/filters.html#feComponentTransfer</a>:
015 <p style='font-style:italic'>
016 "transfer function for red component of the input graphic."
017 </p>
018 @author J. Alex Taylor, hairyfatguy.com
019 */
020//------------------------------------------------------------------------------
021// com.hfg XML/HTML Coding Library
022//
023// This library is free software; you can redistribute it and/or
024// modify it under the terms of the GNU Lesser General Public
025// License as published by the Free Software Foundation; either
026// version 2.1 of the License, or (at your option) any later version.
027//
028// This library is distributed in the hope that it will be useful,
029// but WITHOUT ANY WARRANTY; without even the implied warranty of
030// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
031// Lesser General Public License for more details.
032//
033// You should have received a copy of the GNU Lesser General Public
034// License along with this library; if not, write to the Free Software
035// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
036//
037// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
038// jataylor@hairyfatguy.com
039//------------------------------------------------------------------------------
040
041public class SvgFeFuncR extends SvgFeFunc
042{
043   //###########################################################################
044   // CONSTRUCTORS
045   //###########################################################################
046
047   //---------------------------------------------------------------------------
048   public SvgFeFuncR()
049   {
050      super(SVG.feFuncR);
051   }
052
053   //---------------------------------------------------------------------------
054   public SvgFeFuncR(XMLTag inXMLTag)
055   {
056      this();
057      initFromXMLTag(inXMLTag);
058   }
059
060   //###########################################################################
061   // PUBLIC METHODS
062   //###########################################################################
063
064   //---------------------------------------------------------------------------
065   public SvgFeFuncR setType(ComponentTransferType inValue)
066   {
067      setAttribute(SvgAttr.type, inValue);
068      return this;
069   }
070
071   //---------------------------------------------------------------------------
072   public SvgFeFuncR setTableValues(String inValue)
073   {
074      setAttribute(SvgAttr.tableValues, inValue);
075      return this;
076   }
077
078   //---------------------------------------------------------------------------
079   public SvgFeFuncR setSlope(float inValue)
080   {
081      setAttribute(SvgAttr.slope, inValue);
082      return this;
083   }
084
085   //---------------------------------------------------------------------------
086   public SvgFeFuncR setIntercept(float inValue)
087   {
088      setAttribute(SvgAttr.intercept, inValue);
089      return this;
090   }
091
092   //---------------------------------------------------------------------------
093   public SvgFeFuncR setAmplitude(float inValue)
094   {
095      setAttribute(SvgAttr.amplitude, inValue);
096      return this;
097   }
098
099   //---------------------------------------------------------------------------
100   public SvgFeFuncR setExponent(int inValue)
101   {
102      setAttribute(SvgAttr.exponent, inValue);
103      return this;
104   }
105
106   //---------------------------------------------------------------------------
107   public SvgFeFuncR setOffset(float inValue)
108   {
109      setAttribute(SvgAttr.offset, inValue);
110      return this;
111   }
112}