001package com.hfg.svg.filtereffect; 002 003import com.hfg.svg.AbstractSvgNode; 004import com.hfg.svg.SVG; 005import com.hfg.svg.SvgAttr; 006import com.hfg.xml.XMLAttribute; 007import com.hfg.xml.XMLNamespace; 008import com.hfg.xml.XMLTag; 009 010//------------------------------------------------------------------------------ 011/** 012 Object representation of an SVG (Scalable Vector Graphics) 'feImage' filter effect tag. 013 014 From <a href='http://www.w3.org/TR/2003/REC-SVG11-20030114/filters.html#feImage'> 015 http://www.w3.org/TR/2003/REC-SVG11-20030114/filters.html#feImage</a>: 016 <p style='font-style:italic'> 017 "This filter primitive refers to a graphic external to this filter element, 018 which is loaded or rendered into an RGBA raster and becomes the result of the filter primitive." 019 </p> 020 @author J. Alex Taylor, hairyfatguy.com 021 */ 022//------------------------------------------------------------------------------ 023// com.hfg XML/HTML Coding Library 024// 025// This library is free software; you can redistribute it and/or 026// modify it under the terms of the GNU Lesser General Public 027// License as published by the Free Software Foundation; either 028// version 2.1 of the License, or (at your option) any later version. 029// 030// This library is distributed in the hope that it will be useful, 031// but WITHOUT ANY WARRANTY; without even the implied warranty of 032// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 033// Lesser General Public License for more details. 034// 035// You should have received a copy of the GNU Lesser General Public 036// License along with this library; if not, write to the Free Software 037// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 038// 039// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com 040// jataylor@hairyfatguy.com 041//------------------------------------------------------------------------------ 042 043public class SvgFeImage extends AbstractSvgNode 044{ 045 //########################################################################### 046 // CONSTRUCTORS 047 //########################################################################### 048 049 //--------------------------------------------------------------------------- 050 public SvgFeImage() 051 { 052 super(SVG.feImage); 053 } 054 055 //--------------------------------------------------------------------------- 056 public SvgFeImage(XMLTag inXMLTag) 057 { 058 this(); 059 initFromXMLTag(inXMLTag); 060 } 061 062 //########################################################################### 063 // PUBLIC METHODS 064 //########################################################################### 065 066 067 068 //--------------------------------------------------------------------------- 069 public SvgFeImage setXlinkHref(String inValue) 070 { 071 XMLAttribute attr = new XMLAttribute(SvgAttr.href, inValue); 072 attr.setNamespace(XMLNamespace.getNamespaceViaPrefix("xlink")); 073 setAttribute(attr); 074 return this; 075 } 076 077 078 //--------------------------------------------------------------------------- 079 public SvgFeImage setHeight(int inValue) 080 { 081 setAttribute(SvgAttr.height, inValue); 082 return this; 083 } 084 085 //--------------------------------------------------------------------------- 086 public SvgFeImage setHeight(String inValue) 087 { 088 setAttribute(SvgAttr.height, inValue); 089 return this; 090 } 091 092 //--------------------------------------------------------------------------- 093 public SvgFeImage setResult(String inValue) 094 { 095 setAttribute(SvgAttr.result, inValue); 096 return this; 097 } 098 099 //--------------------------------------------------------------------------- 100 public SvgFeImage setWidth(int inValue) 101 { 102 setAttribute(SvgAttr.width, inValue); 103 return this; 104 } 105 106 //--------------------------------------------------------------------------- 107 public SvgFeImage setWidth(String inValue) 108 { 109 setAttribute(SvgAttr.width, inValue); 110 return this; 111 } 112 113 //--------------------------------------------------------------------------- 114 public SvgFeImage setX(int inValue) 115 { 116 setAttribute(SvgAttr.x, inValue); 117 return this; 118 } 119 120 //--------------------------------------------------------------------------- 121 public SvgFeImage setX(String inValue) 122 { 123 setAttribute(SvgAttr.x, inValue); 124 return this; 125 } 126 127 128 //--------------------------------------------------------------------------- 129 public SvgFeImage setY(int inValue) 130 { 131 setAttribute(SvgAttr.y, inValue); 132 return this; 133 } 134 135 //--------------------------------------------------------------------------- 136 public SvgFeImage setY(String inValue) 137 { 138 setAttribute(SvgAttr.y, inValue); 139 return this; 140 } 141 142 143 144}