- java.lang.Object
-
- com.github.weisj.jsvg.nodes.AbstractSVGNode
-
- com.github.weisj.jsvg.nodes.filter.AbstractFilterPrimitive
-
- com.github.weisj.jsvg.nodes.filter.FeGaussianBlur
-
- All Implemented Interfaces:
FilterPrimitive,SVGNode
@ElementCategories(FilterPrimitive) @PermittedContent(anyOf={Animate.class,Set.class}) public final class FeGaussianBlur extends AbstractFilterPrimitive
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFeGaussianBlur.MixedQualityConvolveOperation
-
Field Summary
Fields Modifier and Type Field Description private static doubleBOX_BLUR_APPROXIMATION_THRESHOLDprivate EdgeModeedgeModeprivate static floatKERNEL_PRECISIONprivate booleanonlyAlphaprivate static doubleSQRT_2_PIprivate float[]stdDeviationstatic java.lang.StringTAGprivate static doubleTHREE_QUARTER_SQRT_2_PIprivate java.awt.image.KernelxBlurprivate doublexCurrentprivate java.awt.image.KernelyBlurprivate doubleyCurrent
-
Constructor Summary
Constructors Constructor Description FeGaussianBlur()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyFilter(@NotNull RenderContext context, @NotNull FilterContext filterContext)voidbuild(@NotNull AttributeNode attributeNode)private double[]computeAbsoluteStdDeviation(@Nullable java.awt.geom.AffineTransform at)private static float[]computeGaussianKernelData(int diameter, double standardDeviation)private @NotNull java.awt.image.KernelcreateConvolveKernel(int diameter, double sigma, boolean horizontal)static intkernelDiameterForStandardDeviation(double standardDeviation)voidlayoutFilter(@NotNull RenderContext context, @NotNull FilterLayoutContext filterLayoutContext)private static floatnormalConvolve(float x, double standardDeviation)voidsetOnlyAlpha(boolean onlyAlpha)@NotNull java.lang.StringtagName()-
Methods inherited from class com.github.weisj.jsvg.nodes.filter.AbstractFilterPrimitive
colorInterpolation, height, impl, width, x, y
-
Methods inherited from class com.github.weisj.jsvg.nodes.AbstractSVGNode
addContent, id, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.weisj.jsvg.nodes.filter.FilterPrimitive
isValid
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
SQRT_2_PI
private static final double SQRT_2_PI
-
THREE_QUARTER_SQRT_2_PI
private static final double THREE_QUARTER_SQRT_2_PI
-
KERNEL_PRECISION
private static final float KERNEL_PRECISION
- See Also:
- Constant Field Values
-
BOX_BLUR_APPROXIMATION_THRESHOLD
private static final double BOX_BLUR_APPROXIMATION_THRESHOLD
- See Also:
- Constant Field Values
-
stdDeviation
private float[] stdDeviation
-
edgeMode
private EdgeMode edgeMode
-
xCurrent
private double xCurrent
-
yCurrent
private double yCurrent
-
xBlur
private java.awt.image.Kernel xBlur
-
yBlur
private java.awt.image.Kernel yBlur
-
onlyAlpha
private boolean onlyAlpha
-
-
Method Detail
-
tagName
@NotNull public @NotNull java.lang.String tagName()
-
build
public void build(@NotNull @NotNull AttributeNode attributeNode)- Specified by:
buildin interfaceSVGNode- Overrides:
buildin classAbstractFilterPrimitive
-
setOnlyAlpha
@Internal public void setOnlyAlpha(boolean onlyAlpha)
-
computeAbsoluteStdDeviation
private double[] computeAbsoluteStdDeviation(@Nullable @Nullable java.awt.geom.AffineTransform at)
-
layoutFilter
public void layoutFilter(@NotNull @NotNull RenderContext context, @NotNull @NotNull FilterLayoutContext filterLayoutContext)
-
applyFilter
public void applyFilter(@NotNull @NotNull RenderContext context, @NotNull @NotNull FilterContext filterContext)
-
createConvolveKernel
@NotNull private @NotNull java.awt.image.Kernel createConvolveKernel(int diameter, double sigma, boolean horizontal)
-
normalConvolve
private static float normalConvolve(float x, double standardDeviation)
-
computeGaussianKernelData
private static float[] computeGaussianKernelData(int diameter, double standardDeviation)
-
kernelDiameterForStandardDeviation
public static int kernelDiameterForStandardDeviation(double standardDeviation)
-
-