- java.lang.Object
-
- com.github.weisj.jsvg.geometry.SVGLine
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.geom.Line2D.Float
line
private LengthValue
x1
private LengthValue
x2
private LengthValue
y1
private LengthValue
y2
-
Constructor Summary
Constructors Constructor Description SVGLine(@NotNull LengthValue x1, @NotNull LengthValue y1, @NotNull LengthValue x2, @NotNull LengthValue y2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.awt.geom.Rectangle2D
bounds(@NotNull RenderContext context, boolean validate)
boolean
canBeFilled()
boolean
isClosed(@NotNull RenderContext context)
double
pathLength(@NotNull RenderContext context)
@NotNull java.awt.Shape
shape(@NotNull RenderContext context, boolean validate)
private void
validateShape(@NotNull MeasureContext measureContext)
-
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
shape, usesOptimizedBoundsCalculation
-
-
-
-
Field Detail
-
line
@NotNull private final java.awt.geom.Line2D.Float line
-
x1
private final LengthValue x1
-
y1
private final LengthValue y1
-
x2
private final LengthValue x2
-
y2
private final LengthValue y2
-
-
Constructor Detail
-
SVGLine
public SVGLine(@NotNull @NotNull LengthValue x1, @NotNull @NotNull LengthValue y1, @NotNull @NotNull LengthValue x2, @NotNull @NotNull LengthValue y2)
-
-
Method Detail
-
canBeFilled
public boolean canBeFilled()
- Specified by:
canBeFilled
in interfaceSVGShape
-
validateShape
private void validateShape(@NotNull @NotNull MeasureContext measureContext)
-
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 RenderContext context)
- Specified by:
pathLength
in interfaceSVGShape
-
isClosed
public boolean isClosed(@NotNull @NotNull RenderContext context)
-
-