Class SVGEllipse

java.lang.Object
com.github.weisj.jsvg.geometry.SVGEllipse
All Implemented Interfaces:
MeasurableLength, MeasurableShape, SVGShape

public final class SVGEllipse extends Object implements MeasurableShape
  • Field Details

    • ellipse

      @NotNull private final Ellipse2D.Float ellipse
    • cx

      @NotNull private final @NotNull Length cx
    • cy

      @NotNull private final @NotNull Length cy
    • rx

      @NotNull private final @NotNull Length rx
    • ry

      @NotNull private final @NotNull Length ry
  • Constructor Details

    • SVGEllipse

      public SVGEllipse(@NotNull @NotNull Length cx, @NotNull @NotNull Length cy, @NotNull @NotNull Length rx, @NotNull @NotNull Length ry)
  • Method Details

    • validateShape

      private void validateShape(@NotNull @NotNull MeasureContext measureContext)
    • shape

      @NotNull public @NotNull Shape shape(@NotNull @NotNull RenderContext context, boolean validate)
      Specified by:
      shape in interface SVGShape
    • bounds

      @NotNull public @NotNull Rectangle2D bounds(@NotNull @NotNull RenderContext context, boolean validate)
      Specified by:
      bounds in interface SVGShape
    • pathLength

      public double pathLength(@NotNull @NotNull MeasureContext measureContext)
      Specified by:
      pathLength in interface MeasurableLength
    • ellipseCircumference

      static double ellipseCircumference(double a, double b)