public class SvgFeConvolveMatrix extends AbstractSvgNode
"feConvolveMatrix applies a matrix convolution filter effect. A convolution combines pixels in the input image with neighboring pixels to produce a resulting image. A wide variety of imaging operations can be achieved through convolutions, including blurring, edge detection, sharpening, embossing and beveling.
A matrix convolution is based on an n-by-m matrix (the convolution kernel) which describes how a given pixel value in the input image is combined with its neighboring pixel values to produce a resulting pixel value. Each result pixel is determined by applying the kernel matrix to the corresponding source pixel and its neighboring pixels. The basic convolution formula which is applied to each color value for a given pixel is:
RESULTX,Y = (
SUM I=0 to [orderY-1] {
SUM J=0 to [orderX-1] {
SOURCE X-targetX+J, Y-targetY+I * kernelMatrixorderX-J-1, orderY-I-1
}
}
) / divisor + bias
where "orderX" and "orderY" represent the X and Y values for the order attribute, "targetX" represents the value of the targetX attribute, "targetY" represents the value of the targetY attribute, "kernelMatrix" represents the value of the kernelMatrix attribute, "divisor" represents the value of the divisor attribute, and "bias" represents the value of the bias attribute.
Note in the above formulas that the values in the kernel matrix are applied such that the kernel matrix is rotated 180 degrees relative to the source and destination images in order to match convolution theory as described in many computer graphics textbooks."
XMLContainerImpl.sMode
mContentAndSubtagList
Constructor and Description |
---|
SvgFeConvolveMatrix() |
SvgFeConvolveMatrix(XMLTag inXMLTag) |
addClass, addStyle, adjustBoundsForTransform, applyTransform, applyTransforms, draw, drawSubnodes, getAdjustedFont, getBoundsBox, getCenterPoint, getClassAttribute, getCssTransform, getG2Composite, getG2Paint, getG2Stroke, getG2StrokeColor, getTransform, initFromXMLTag, rangeCheckOpacityValue, setClass, setFilter, setId, setOnClick, setOnMouseDown, setOnMouseOut, setOnMouseOver, setOnMouseUp, setPosition, setStyle, setTitle, setTransform
addSubtag, addSubtag, addXMLNamespaceDeclaration, clone, compareTo, equals, findNodesByAttributeValue, findNodesByAttributeValue, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getEndTag, getNamespace, getQualifiedTagName, getStartTag, getTagName, hasAttribute, hasAttribute, hasAttributes, isEmptyTag, removeAttribute, removeAttribute, replaceCharacterEntities, setAttribute, setAttribute, setAttribute, setAttributes, setContent, setDefaultXMLNamespaceDeclaration, setNamespace, setSortAttributesBeforeWriting, setTagName, setTagName, sortAttributes, toIndentedXML, toIndentedXML, toIndentedXML, toIndentedXML, toString, toXML, toXML, toXML, toXML, useDoubleQuotes, verifyTagName, verifyTagName, verifyTagName, verifyTagName
addContent, addContentWithoutEscaping, addSubtag, addSubtag, addSubtags, clearContent, clearSubtags, getContent, getContentPlusSubtagList, getNextSibling, getOptionalSubtagByName, getOptionalSubtagByName, getOptionalSubtagByName, getOptionalSubtagByName, getParentNode, getPreviousSibling, getRequiredSubtagById, getRequiredSubtagById, getRequiredSubtagByName, getRequiredSubtagByName, getSubtagByAttribute, getSubtagByAttribute, getSubtags, getSubtagsByAttribute, getSubtagsByAttribute, getSubtagsByAttribute, getSubtagsByAttribute, getSubtagsByAttribute, getSubtagsByClass, getSubtagsByClass, getSubtagsByName, getSubtagsByName, getSubtagsByName, getSubtagsByName, getSubtagsByName, getTotalTagCount, getUnescapedContent, getXMLNodeSubtags, hasContent, hasContentOrSubtags, indexOf, innerHTML, removeSubtag, removeSubtagsByAttribute, removeSubtagsByAttribute, removeSubtagsByAttribute, removeSubtagsByClass, removeSubtagsByClass, removeSubtagsByName, removeSubtagsByName, removeSubtagsByName, setContent, setParentNode, setSubtags
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findNodesByAttributeValue, findNodesByAttributeValue, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getNamespace, getTagName, hasAttribute, hasAttribute, hasAttributes, isEmptyTag, removeAttribute, removeAttribute, replaceCharacterEntities, setAttribute, setAttribute, setAttribute, setAttributes, setNamespace, setTagName, setTagName, toIndentedXML, verifyTagName, verifyTagName, verifyTagName, verifyTagName
addContent, addContentWithoutEscaping, addSubtag, addSubtags, clearContent, clearSubtags, getContent, getNextSibling, getOptionalSubtagByName, getOptionalSubtagByName, getParentNode, getPreviousSibling, getRequiredSubtagByName, getRequiredSubtagByName, getSubtags, getSubtagsByName, getSubtagsByName, getSubtagsByName, getSubtagsByName, getTotalTagCount, getUnescapedContent, getXMLNodeSubtags, hasContent, indexOf, removeSubtag, removeSubtagsByName, removeSubtagsByName, setContent, setParentNode, setSubtags
clone, toIndentedXML, toIndentedXML, toIndentedXML, toXML, toXML, toXML
public SvgFeConvolveMatrix()
public SvgFeConvolveMatrix(XMLTag inXMLTag)
public SvgFeConvolveMatrix setColorInterpolationFilters(ColorInterpolationFilters inValue)
public SvgFeConvolveMatrix setIn(FeInput inValue)
public SvgFeConvolveMatrix setOrder(int inValue)
public SvgFeConvolveMatrix setOrder(String inValue)
public SvgFeConvolveMatrix setKernelMatrix(String inValue)
public SvgFeConvolveMatrix setDivisor(float inValue)
public SvgFeConvolveMatrix setBias(float inValue)
public SvgFeConvolveMatrix setTargetX(float inValue)
public SvgFeConvolveMatrix setTargetY(float inValue)
public SvgFeConvolveMatrix setEdgeMode(MatrixEdgeMode inValue)
public SvgFeConvolveMatrix setKernelUnitLength(String inValue)
public SvgFeConvolveMatrix setPreserveAlpha(boolean inValue)
public SvgFeConvolveMatrix setHeight(int inValue)
public SvgFeConvolveMatrix setHeight(String inValue)
public SvgFeConvolveMatrix setResult(String inValue)
public SvgFeConvolveMatrix setWidth(int inValue)
public SvgFeConvolveMatrix setWidth(String inValue)
public SvgFeConvolveMatrix setX(int inValue)
public SvgFeConvolveMatrix setX(String inValue)
public SvgFeConvolveMatrix setY(int inValue)
public SvgFeConvolveMatrix setY(String inValue)