Class Filter
- java.lang.Object
-
- com.github.weisj.jsvg.nodes.AbstractSVGNode
-
- com.github.weisj.jsvg.nodes.container.BaseContainerNode<SVGNode>
-
- com.github.weisj.jsvg.nodes.container.ContainerNode
-
- com.github.weisj.jsvg.nodes.filter.Filter
-
@ElementCategories({}) @PermittedContent(categories={Descriptive,FilterPrimitive}, anyOf={Animate.class,Set.class}) public final class Filter extends ContainerNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Filter.AlphaImageFilter
static class
Filter.FilterInfo
-
Field Summary
Fields Modifier and Type Field Description private static boolean
DEBUG
private static Length
DEFAULT_FILTER_COORDINATE
private static Length
DEFAULT_FILTER_SIZE
private UnitType
filterPrimitiveUnits
private UnitType
filterUnits
private Length
height
private boolean
isValid
static java.lang.String
TAG
private Length
width
private Length
x
private Length
y
-
Constructor Summary
Constructors Constructor Description Filter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
acceptChild(@Nullable java.lang.String id, @NotNull SVGNode node)
Determine whether the container accepts thisSVGNode
as a child.void
applyFilter(@NotNull java.awt.Graphics2D g, @NotNull RenderContext context, @NotNull Filter.FilterInfo filterInfo)
void
build(@NotNull AttributeNode attributeNode)
private @NotNull Length
coerceToPercentage(@NotNull Length length)
@NotNull Filter.FilterInfo
createFilterInfo(@NotNull java.awt.Graphics2D g, @NotNull RenderContext context, @NotNull java.awt.geom.Rectangle2D elementBounds)
boolean
hasEffect()
@NotNull java.lang.String
tagName()
-
Methods inherited from class com.github.weisj.jsvg.nodes.container.ContainerNode
children, doAdd
-
Methods inherited from class com.github.weisj.jsvg.nodes.container.BaseContainerNode
addChild, isAcceptableType
-
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.prototype.Container
childrenOfType
-
-
-
-
Field Detail
-
DEBUG
private static final boolean DEBUG
- See Also:
- Constant Field Values
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
DEFAULT_FILTER_COORDINATE
private static final Length DEFAULT_FILTER_COORDINATE
-
DEFAULT_FILTER_SIZE
private static final Length DEFAULT_FILTER_SIZE
-
x
private Length x
-
y
private Length y
-
width
private Length width
-
height
private Length height
-
filterUnits
private UnitType filterUnits
-
filterPrimitiveUnits
private UnitType filterPrimitiveUnits
-
isValid
private boolean isValid
-
-
Method Detail
-
tagName
@NotNull public @NotNull java.lang.String tagName()
-
hasEffect
public boolean hasEffect()
-
build
public void build(@NotNull @NotNull AttributeNode attributeNode)
- Specified by:
build
in interfaceSVGNode
- Overrides:
build
in classAbstractSVGNode
-
coerceToPercentage
@NotNull private @NotNull Length coerceToPercentage(@NotNull @NotNull Length length)
-
createFilterInfo
@NotNull public @NotNull Filter.FilterInfo createFilterInfo(@NotNull @NotNull java.awt.Graphics2D g, @NotNull @NotNull RenderContext context, @NotNull @NotNull java.awt.geom.Rectangle2D elementBounds)
-
applyFilter
public void applyFilter(@NotNull @NotNull java.awt.Graphics2D g, @NotNull @NotNull RenderContext context, @NotNull @NotNull Filter.FilterInfo filterInfo)
-
acceptChild
protected boolean acceptChild(@Nullable @Nullable java.lang.String id, @NotNull @NotNull SVGNode node)
Description copied from class:BaseContainerNode
Determine whether the container accepts thisSVGNode
as a child. By default, this will always report true but subclasses may choose to reject certain types of nodes.- Overrides:
acceptChild
in classBaseContainerNode<SVGNode>
- Parameters:
id
- the id of the nodenode
- the node itself- Returns:
- whether the node can be inserted as a child.
-
-