Module com.github.weisj.jsvg
Package com.github.weisj.jsvg.geometry
Class AWTSVGShape<T extends java.awt.Shape>
- java.lang.Object
-
- com.github.weisj.jsvg.geometry.AWTSVGShape<T>
-
- All Implemented Interfaces:
SVGShape
- Direct Known Subclasses:
FillRuleAwareAWTSVGShape
public class AWTSVGShape<T extends java.awt.Shape> extends java.lang.Object implements SVGShape
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.geom.Rectangle2D
boundsCache
static java.awt.geom.Rectangle2D
EMPTY_SHAPE
private double
pathLength
private T
shapeCache
protected @NotNull Value<@NotNull T>
shapeValue
-
Constructor Summary
Constructors Modifier Constructor Description AWTSVGShape(@NotNull Value<@NotNull T> shapeValue)
private
AWTSVGShape(@NotNull Value<@NotNull T> shapeValue, double pathLength)
AWTSVGShape(T shape)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.awt.geom.Rectangle2D
bounds(@NotNull RenderContext context, boolean validate)
private double
computePathLength(@NotNull RenderContext context)
boolean
isClosed(@NotNull RenderContext context)
double
pathLength(@NotNull RenderContext context)
T
shape(@NotNull RenderContext context, boolean validate)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.weisj.jsvg.geometry.SVGShape
canBeFilled, shape, usesOptimizedBoundsCalculation
-
-
-
-
Field Detail
-
EMPTY_SHAPE
public static final java.awt.geom.Rectangle2D EMPTY_SHAPE
-
boundsCache
private java.awt.geom.Rectangle2D boundsCache
-
shapeCache
private T extends java.awt.Shape shapeCache
-
pathLength
private double pathLength
-
-
Method Detail
-
shape
@NotNull public T shape(@NotNull @NotNull RenderContext context, boolean validate)
-
bounds
@NotNull public @NotNull java.awt.geom.Rectangle2D bounds(@NotNull @NotNull RenderContext context, boolean validate)
-
pathLength
public double pathLength(@NotNull @NotNull RenderContext context)
- Specified by:
pathLength
in interfaceSVGShape
-
computePathLength
private double computePathLength(@NotNull @NotNull RenderContext context)
-
isClosed
public boolean isClosed(@NotNull @NotNull RenderContext context)
-
-