Class GeometryUtil

java.lang.Object
com.github.weisj.jsvg.geometry.util.GeometryUtil

public final class GeometryUtil extends Object
  • Field Details

  • Constructor Details

    • GeometryUtil

      private GeometryUtil()
  • Method Details

    • approximatelyEqual

      public static boolean approximatelyEqual(double a, double b)
    • approximatelyZero

      public static boolean approximatelyZero(double a)
    • notablyGreater

      public static boolean notablyGreater(double a, double b)
    • approximatelyNegative

      public static boolean approximatelyNegative(double a)
    • scaleXOfTransform

      public static double scaleXOfTransform(@Nullable @Nullable AffineTransform at)
    • scaleYOfTransform

      public static double scaleYOfTransform(@Nullable @Nullable AffineTransform at)
    • midPoint

      @NotNull public static Point2D.Float midPoint(@NotNull Point2D.Float x, @NotNull Point2D.Float y)
    • lerp

      @NotNull public static Point2D.Float lerp(float t, @NotNull Point2D.Float a, @NotNull Point2D.Float b)
    • lerp

      public static float lerp(float t, float a, float b)
    • distanceSquared

      public static double distanceSquared(@NotNull Point2D.Float p1, @NotNull Point2D.Float p2, float scaleX, float scaleY)
    • distanceSquared

      public static double distanceSquared(@NotNull Point2D.Float p1, @NotNull Point2D.Float p2)
    • distanceSquared

      public static double distanceSquared(double x1, double y1, double x2, double y2)
    • pathLength

      public static double pathLength(@NotNull @NotNull Shape shape)
    • lineLength

      public static double lineLength(double x1, double y1, double x2, double y2)
    • containingBoundsAfterTransform

      @NotNull public static @NotNull Rectangle2D containingBoundsAfterTransform(@NotNull @NotNull AffineTransform transform, @NotNull @NotNull Rectangle2D rect)
    • left

      public static float left(@NotNull @NotNull Rectangle2D rect)
    • top

      public static float top(@NotNull @NotNull Rectangle2D rect)
    • right

      public static float right(@NotNull @NotNull Rectangle2D rect)
    • bottom

      public static float bottom(@NotNull @NotNull Rectangle2D rect)
    • grow

      @NotNull public static @NotNull Rectangle2D grow(@NotNull @NotNull Rectangle2D bounds, FloatInsets grow)
    • grow

      @NotNull public static @NotNull Rectangle2D grow(@NotNull @NotNull Rectangle2D bounds, double increase)
    • max

      @NotNull public static @NotNull FloatInsets max(@NotNull @NotNull FloatInsets in1, @NotNull @NotNull FloatInsets in2)
    • min

      @NotNull public static @NotNull FloatInsets min(@NotNull @NotNull FloatInsets in1, @NotNull @NotNull FloatInsets in2)
    • overhangInsets

      @NotNull public static @NotNull FloatInsets overhangInsets(@NotNull @NotNull Rectangle2D reference, @NotNull @NotNull Rectangle2D bounds)
    • compactRepresentation

      @NotNull public static @NotNull String compactRepresentation(@NotNull @NotNull Rectangle2D rect)
    • toIntegerBounds

      @NotNull public static @NotNull Rectangle2D toIntegerBounds(@NotNull @NotNull Rectangle2D in, @NotNull @NotNull Rectangle2D out)
    • adjustForAliasing

      @NotNull public static @NotNull Rectangle2D adjustForAliasing(@NotNull @NotNull Rectangle2D r)
    • createInverse

      @NotNull public static @NotNull AffineTransform createInverse(@NotNull @NotNull AffineTransform at)
    • convertBounds

      @NotNull public static @NotNull Rectangle2D convertBounds(@NotNull @NotNull RenderContext context, @NotNull @NotNull Rectangle2D r, @NotNull @NotNull GeometryUtil.Space from, @NotNull @NotNull GeometryUtil.Space to)
    • userBoundsToDeviceBounds

      @NotNull public static @NotNull Rectangle2D userBoundsToDeviceBounds(@NotNull @NotNull RenderContext context, @NotNull @NotNull Rectangle2D r)
    • getLocation

      @NotNull public static @NotNull Point2D getLocation(@NotNull @NotNull Rectangle2D r)