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:
MeasurableLength
,MeasurableShape
,SVGShape
- Direct Known Subclasses:
FillRuleAwareAWTSVGShape
public class AWTSVGShape<T extends java.awt.Shape> extends java.lang.Object implements MeasurableShape
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.geom.Rectangle2D
bounds
static java.awt.geom.Rectangle2D
EMPTY_SHAPE
private double
pathLength
protected T
shape
-
Constructor Summary
Constructors Modifier Constructor Description AWTSVGShape(T shape)
private
AWTSVGShape(T shape, double pathLength)
-
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
computeGenericPathLength()
private double
computePathLength()
double
pathLength(@NotNull MeasureContext measureContext)
@NotNull java.awt.Shape
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
-
shape
@NotNull protected final T extends java.awt.Shape shape
-
bounds
private java.awt.geom.Rectangle2D bounds
-
pathLength
private double pathLength
-
-
Method Detail
-
shape
@NotNull public @NotNull java.awt.Shape 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 MeasureContext measureContext)
- Specified by:
pathLength
in interfaceMeasurableLength
-
computePathLength
private double computePathLength()
-
computeGenericPathLength
private double computeGenericPathLength()
-
-