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.Rectangle2DboundsCachestatic java.awt.geom.Rectangle2DEMPTY_SHAPEprivate doublepathLengthprivate TshapeCacheprotected @NotNull Value<@NotNull T>shapeValue
-
Constructor Summary
Constructors Modifier Constructor Description AWTSVGShape(@NotNull Value<@NotNull T> shapeValue)privateAWTSVGShape(@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.Rectangle2Dbounds(@NotNull RenderContext context, boolean validate)private doublecomputePathLength(@NotNull RenderContext context)booleanisClosed(@NotNull RenderContext context)doublepathLength(@NotNull RenderContext context)Tshape(@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:
pathLengthin interfaceSVGShape
-
computePathLength
private double computePathLength(@NotNull @NotNull RenderContext context)
-
isClosed
public boolean isClosed(@NotNull @NotNull RenderContext context)
-
-