Package com.github.weisj.jsvg.nodes
Class LinearGradient
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.LinearGradient
@ElementCategories(Gradient)
@PermittedContent(categories=Descriptive,
anyOf=Stop.class)
public final class LinearGradient
extends ContainerNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AffineTransformprotected UnitTypeprotected SpreadMethodstatic StringFields inherited from interface com.github.weisj.jsvg.attributes.paint.SVGPaint
CONTEXT_FILL, CONTEXT_STROKE, CURRENT_COLOR, DEFAULT_PAINT, NONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild(@NotNull AttributeNode attributeNode)protected voidbuildGradient(@NotNull AttributeNode attributeNode, @Nullable LinearGradient template)@NotNull Color[]colors()protected @NotNull AffineTransformcomputeViewTransform(@NotNull Rectangle2D bounds)voiddrawShape(@NotNull Graphics2D g, @NotNull MeasureContext measure, @NotNull Shape shape, @Nullable Rectangle2D bounds)voidfillShape(@NotNull Graphics2D g, @NotNull MeasureContext measure, @NotNull Shape shape, @Nullable Rectangle2D bounds)protected @NotNull PaintgradientForBounds(@NotNull MeasureContext measure, @NotNull Rectangle2D bounds, float[] gradOffsets, @NotNull Color[] gradColors)float[]offsets()@NotNull StringtagName()toString()Methods inherited from class com.github.weisj.jsvg.nodes.container.ContainerNode
children, doAddMethods inherited from class com.github.weisj.jsvg.nodes.container.BaseContainerNode
acceptChild, addChild, isAcceptableTypeMethods inherited from class com.github.weisj.jsvg.nodes.AbstractSVGNode
addContent, idMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.weisj.jsvg.nodes.prototype.Container
childrenOfType
-
Field Details
-
TAG
- See Also:
- Constant Field Values
-
gradientTransform
-
gradientUnits
-
spreadMethod
-
-
Constructor Details
-
LinearGradient
public LinearGradient()
-
-
Method Details
-
tagName
-
buildGradient
protected void buildGradient(@NotNull @NotNull AttributeNode attributeNode, @Nullable @Nullable LinearGradient template) -
gradientForBounds
@NotNull protected @NotNull Paint gradientForBounds(@NotNull @NotNull MeasureContext measure, @NotNull @NotNull Rectangle2D bounds, float[] gradOffsets, @NotNull @NotNull Color[] gradColors) -
toString
- Overrides:
toStringin classAbstractSVGNode
-
offsets
public float[] offsets() -
colors
-
build
- Specified by:
buildin interfaceSVGNode- Overrides:
buildin classAbstractSVGNode
-
fillShape
public void fillShape(@NotNull @NotNull Graphics2D g, @NotNull @NotNull MeasureContext measure, @NotNull @NotNull Shape shape, @Nullable @Nullable Rectangle2D bounds) -
drawShape
public void drawShape(@NotNull @NotNull Graphics2D g, @NotNull @NotNull MeasureContext measure, @NotNull @NotNull Shape shape, @Nullable @Nullable Rectangle2D bounds) -
computeViewTransform
@NotNull protected @NotNull AffineTransform computeViewTransform(@NotNull @NotNull Rectangle2D bounds)
-