Class AbstractGradient<Self extends AbstractGradient<Self>>

All Implemented Interfaces:
SVGPaint, Container<SVGNode>, SVGNode
Direct Known Subclasses:
LinearGradient, RadialGradient

abstract class AbstractGradient<Self extends AbstractGradient<Self>> extends ContainerNode implements SVGPaint
  • Field Details

    • gradientTransform

      protected AffineTransform gradientTransform
    • gradientUnits

      protected UnitType gradientUnits
    • spreadMethod

      protected SpreadMethod spreadMethod
    • colors

      @NotNull private @NotNull Color[] colors
    • offsets

      private float[] offsets
  • Constructor Details

    • AbstractGradient

      AbstractGradient()
  • Method Details

    • offsets

      public final float[] offsets()
    • colors

      @NotNull public final @NotNull Color[] colors()
    • build

      public final void build(@NotNull @NotNull AttributeNode attributeNode)
      Specified by:
      build in interface SVGNode
      Overrides:
      build in class AbstractSVGNode
    • parseStops

      private void parseStops(@NotNull @NotNull List<Stop> stops)
    • parseTemplate

      @Nullable private @Nullable AbstractGradient<?> parseTemplate(@NotNull @NotNull AttributeNode attributeNode)
    • buildGradient

      protected abstract void buildGradient(@NotNull @NotNull AttributeNode attributeNode, @Nullable Self template)
    • fillShape

      public void fillShape(@NotNull @NotNull Output output, @NotNull @NotNull RenderContext context, @NotNull @NotNull Shape shape, @Nullable @Nullable Rectangle2D bounds)
      Specified by:
      fillShape in interface SVGPaint
    • drawShape

      public void drawShape(@NotNull @NotNull Output output, @NotNull @NotNull RenderContext context, @NotNull @NotNull Shape shape, @Nullable @Nullable Rectangle2D bounds)
      Specified by:
      drawShape in interface SVGPaint
    • paintForBounds

      @NotNull private @NotNull Paint paintForBounds(@NotNull @NotNull MeasureContext context, @NotNull @NotNull Rectangle2D bounds)
    • gradientForBounds

      @NotNull protected abstract @NotNull Paint gradientForBounds(@NotNull @NotNull MeasureContext measure, @NotNull @NotNull Rectangle2D bounds, float[] gradOffsets, @NotNull @NotNull Color[] gradColors)
    • computeViewTransform

      @NotNull protected final @NotNull AffineTransform computeViewTransform(@NotNull @NotNull Rectangle2D bounds)