Package com.github.weisj.jsvg.nodes
Class Pattern
- java.lang.Object
-
- All Implemented Interfaces:
SVGPaint
,Container<SVGNode>
,HasClip
,HasContext
,HasContext.ByDelegate
,HasFillRule
,HasFilter
,HasFontContext
,HasFontRenderContext
,HasGeometryContext
,HasGeometryContext.ByDelegate
,HasPaintContext
,HasShape
,Instantiator
,Renderable
,ShapedContainer<SVGNode>
,Transformable
,SVGNode
@ElementCategories(Container) @PermittedContent(categories={Animation,Descriptive,Shape,Structural,Gradient}, anyOf={Anchor.class,ClipPath.class,Filter.class,Image.class,Mask.class,Marker.class,Pattern.class,Style.class,Text.class,View.class}) public final class Pattern extends BaseInnerViewContainer implements SVGPaint, ShapedContainer<SVGNode>, Instantiator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.weisj.jsvg.nodes.prototype.HasContext
HasContext.ByDelegate
-
Nested classes/interfaces inherited from interface com.github.weisj.jsvg.nodes.prototype.HasGeometryContext
HasGeometryContext.ByDelegate
-
Nested classes/interfaces inherited from interface com.github.weisj.jsvg.nodes.prototype.HasShape
HasShape.Box
-
-
Field Summary
Fields Modifier and Type Field Description private Length
height
private UnitType
patternContentUnits
private java.awt.geom.AffineTransform
patternTransform
private UnitType
patternUnits
static java.lang.String
TAG
private Length
width
private Length
x
private Length
y
-
Fields inherited from class com.github.weisj.jsvg.nodes.container.BaseInnerViewContainer
preserveAspectRatio, viewBox
-
Fields inherited from interface com.github.weisj.jsvg.attributes.paint.SVGPaint
CONTEXT_FILL, CONTEXT_STROKE, CURRENT_COLOR, DEFAULT_PAINT, NONE
-
-
Constructor Summary
Constructors Constructor Description Pattern()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected @Nullable java.awt.geom.Point2D
anchorLocation(@NotNull MeasureContext context)
void
build(@NotNull AttributeNode attributeNode)
boolean
canInstantiate(@NotNull SVGNode node)
protected @NotNull Overflow
defaultOverflow()
void
drawShape(@NotNull Output output, @NotNull RenderContext context, @NotNull java.awt.Shape shape, @Nullable java.awt.geom.Rectangle2D bounds)
void
fillShape(@NotNull Output output, @NotNull RenderContext context, @NotNull java.awt.Shape shape, @Nullable java.awt.geom.Rectangle2D bounds)
boolean
isVisible()
protected @NotNull java.awt.geom.Point2D
outerLocation(@NotNull MeasureContext context)
private @NotNull java.awt.Paint
paintForBounds(@NotNull Output output, @NotNull RenderContext context, @NotNull java.awt.geom.Rectangle2D bounds)
private @Nullable Pattern
parseTemplate(@NotNull AttributeNode attributeNode)
boolean
requiresInstantiation()
Indicated whether the element can only be rendered through means of instantiation e.g.@NotNull FloatSize
size(@NotNull RenderContext context)
@NotNull java.lang.String
tagName()
-
Methods inherited from class com.github.weisj.jsvg.nodes.container.BaseInnerViewContainer
createInnerContext, render, renderWithCurrentViewBox, renderWithSize, renderWithSize, staticViewBox, viewBox
-
Methods inherited from class com.github.weisj.jsvg.nodes.container.CommonRenderableContainerNode
children, contextDelegate, doAdd, geometryContextDelegate, isVisible
-
Methods inherited from class com.github.weisj.jsvg.nodes.container.BaseContainerNode
acceptChild, 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
addChild, children, childrenOfType
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.HasContext.ByDelegate
fillRule, fontRenderContext, fontSpec, paintContext
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.HasGeometryContext.ByDelegate
clipPath, filter, mask, transform, transformOrigin
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.HasShape
elementBounds, elementShape
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.Instantiator
createContextAttributes
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.Renderable
parseIsVisible, shouldEstablishChildContext
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.ShapedContainer
untransformedElementBounds, untransformedElementShape
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.Transformable
applyTransform, shouldTransform, transformShape
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
x
private Length x
-
y
private Length y
-
width
private Length width
-
height
private Length height
-
patternUnits
private UnitType patternUnits
-
patternContentUnits
private UnitType patternContentUnits
-
patternTransform
private java.awt.geom.AffineTransform patternTransform
-
-
Method Detail
-
tagName
@NotNull public @NotNull java.lang.String tagName()
-
outerLocation
@NotNull protected @NotNull java.awt.geom.Point2D outerLocation(@NotNull @NotNull MeasureContext context)
- Specified by:
outerLocation
in classBaseInnerViewContainer
-
anchorLocation
@Nullable protected @Nullable java.awt.geom.Point2D anchorLocation(@NotNull @NotNull MeasureContext context)
- Specified by:
anchorLocation
in classBaseInnerViewContainer
-
defaultOverflow
@NotNull protected @NotNull Overflow defaultOverflow()
- Specified by:
defaultOverflow
in classBaseInnerViewContainer
-
size
@NotNull public @NotNull FloatSize size(@NotNull @NotNull RenderContext context)
- Specified by:
size
in classBaseInnerViewContainer
-
build
public void build(@NotNull @NotNull AttributeNode attributeNode)
- Specified by:
build
in interfaceSVGNode
- Overrides:
build
in classBaseInnerViewContainer
-
parseTemplate
@Nullable private @Nullable Pattern parseTemplate(@NotNull @NotNull AttributeNode attributeNode)
-
fillShape
public void fillShape(@NotNull @NotNull Output output, @NotNull @NotNull RenderContext context, @NotNull @NotNull java.awt.Shape shape, @Nullable @Nullable java.awt.geom.Rectangle2D bounds)
-
drawShape
public void drawShape(@NotNull @NotNull Output output, @NotNull @NotNull RenderContext context, @NotNull @NotNull java.awt.Shape shape, @Nullable @Nullable java.awt.geom.Rectangle2D bounds)
-
paintForBounds
@NotNull private @NotNull java.awt.Paint paintForBounds(@NotNull @NotNull Output output, @NotNull @NotNull RenderContext context, @NotNull @NotNull java.awt.geom.Rectangle2D bounds)
-
requiresInstantiation
public boolean requiresInstantiation()
Description copied from interface:Renderable
Indicated whether the element can only be rendered through means of instantiation e.g. being referenced in a use tag. Instantiation doesn't create a new element it only controls, when an element can be rendered.- Specified by:
requiresInstantiation
in interfaceRenderable
- Returns:
- true if only rendered is instantiated.
-
canInstantiate
public boolean canInstantiate(@NotNull @NotNull SVGNode node)
- Specified by:
canInstantiate
in interfaceInstantiator
-
-