001package com.hfg.svg.filtereffect; 002 003import com.hfg.svg.AbstractSvgNode; 004import com.hfg.svg.SVG; 005import com.hfg.svg.SvgAttr; 006import com.hfg.util.collection.CollectionUtil; 007import com.hfg.xml.XMLAttribute; 008import com.hfg.xml.XMLTag; 009 010//------------------------------------------------------------------------------ 011/** 012 Object representation of an SVG (Scalable Vector Graphics) 'feGaussianBlur' filter effect tag. 013 014 From <a href='http://www.w3.org/TR/2003/REC-SVG11-20030114/filters.html#feGaussianBlur'> 015 http://www.w3.org/TR/2003/REC-SVG11-20030114/filters.html#feGaussianBlur</a>: 016 <p style='font-style:italic'> 017 "This filter primitive performs a Gaussian blur on the input image." 018 </p> 019 @author J. Alex Taylor, hairyfatguy.com 020 */ 021//------------------------------------------------------------------------------ 022// com.hfg XML/HTML Coding Library 023// 024// This library is free software; you can redistribute it and/or 025// modify it under the terms of the GNU Lesser General Public 026// License as published by the Free Software Foundation; either 027// version 2.1 of the License, or (at your option) any later version. 028// 029// This library is distributed in the hope that it will be useful, 030// but WITHOUT ANY WARRANTY; without even the implied warranty of 031// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 032// Lesser General Public License for more details. 033// 034// You should have received a copy of the GNU Lesser General Public 035// License along with this library; if not, write to the Free Software 036// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 037// 038// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com 039// jataylor@hairyfatguy.com 040//------------------------------------------------------------------------------ 041 042public class SvgFeGaussianBlur extends AbstractSvgNode 043{ 044 //########################################################################### 045 // CONSTRUCTORS 046 //########################################################################### 047 048 //--------------------------------------------------------------------------- 049 public SvgFeGaussianBlur() 050 { 051 super(SVG.feGaussianBlur); 052 } 053 054 //--------------------------------------------------------------------------- 055 public SvgFeGaussianBlur(XMLTag inXMLTag) 056 { 057 this(); 058 059 inXMLTag.verifyTagName(getTagName()); 060 061 if (CollectionUtil.hasValues(inXMLTag.getAttributes())) 062 { 063 for (XMLAttribute attr : inXMLTag.getAttributes()) 064 { 065 setAttribute(attr.clone()); 066 } 067 } 068 069 java.util.List<XMLTag> subtags = inXMLTag.getSubtags(); 070 if (CollectionUtil.hasValues(subtags)) 071 { 072 for (XMLTag subtag : subtags) 073 { 074 addSubtag(SVG.constructFromXMLTag(subtag)); 075 } 076 } 077 } 078 079 //########################################################################### 080 // PUBLIC METHODS 081 //########################################################################### 082 083 084 //--------------------------------------------------------------------------- 085 public SvgFeGaussianBlur setColorInterpolationFilters(ColorInterpolationFilters inValue) 086 { 087 setAttribute(SvgAttr.colorInterpolationFilters, inValue); 088 return this; 089 } 090 091 //--------------------------------------------------------------------------- 092 public SvgFeGaussianBlur setIn(FeInput inValue) 093 { 094 setAttribute(SvgAttr.in, inValue); 095 return this; 096 } 097 098 //--------------------------------------------------------------------------- 099 public SvgFeGaussianBlur setStdDeviation(int inValue) 100 { 101 setAttribute(SvgAttr.stdDeviation, inValue); 102 return this; 103 } 104 105 //--------------------------------------------------------------------------- 106 public SvgFeGaussianBlur setStdDeviation(String inValue) 107 { 108 setAttribute(SvgAttr.stdDeviation, inValue); 109 return this; 110 } 111 112 //--------------------------------------------------------------------------- 113 public SvgFeGaussianBlur setHeight(int inValue) 114 { 115 setAttribute(SvgAttr.height, inValue); 116 return this; 117 } 118 119 //--------------------------------------------------------------------------- 120 public SvgFeGaussianBlur setHeight(String inValue) 121 { 122 setAttribute(SvgAttr.height, inValue); 123 return this; 124 } 125 126 //--------------------------------------------------------------------------- 127 public SvgFeGaussianBlur setResult(String inValue) 128 { 129 setAttribute(SvgAttr.result, inValue); 130 return this; 131 } 132 133 //--------------------------------------------------------------------------- 134 public SvgFeGaussianBlur setWidth(int inValue) 135 { 136 setAttribute(SvgAttr.width, inValue); 137 return this; 138 } 139 140 //--------------------------------------------------------------------------- 141 public SvgFeGaussianBlur setWidth(String inValue) 142 { 143 setAttribute(SvgAttr.width, inValue); 144 return this; 145 } 146 147 //--------------------------------------------------------------------------- 148 public SvgFeGaussianBlur setX(int inValue) 149 { 150 setAttribute(SvgAttr.x, inValue); 151 return this; 152 } 153 154 //--------------------------------------------------------------------------- 155 public SvgFeGaussianBlur setX(String inValue) 156 { 157 setAttribute(SvgAttr.x, inValue); 158 return this; 159 } 160 161 162 //--------------------------------------------------------------------------- 163 public SvgFeGaussianBlur setY(int inValue) 164 { 165 setAttribute(SvgAttr.y, inValue); 166 return this; 167 } 168 169 //--------------------------------------------------------------------------- 170 public SvgFeGaussianBlur setY(String inValue) 171 { 172 setAttribute(SvgAttr.y, inValue); 173 return this; 174 } 175 176}