Class GeometryUtil
java.lang.Object
com.github.weisj.jsvg.geometry.util.GeometryUtil
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Rectangle2DadjustForAliasing(@NotNull Rectangle2D r) static booleanapproximatelyEqual(double a, double b) static booleanapproximatelyNegative(double a) static booleanapproximatelyZero(double a) static floatbottom(@NotNull Rectangle2D rect) static @NotNull StringcompactRepresentation(@NotNull Rectangle2D rect) static @NotNull Rectangle2DcontainingBoundsAfterTransform(@NotNull AffineTransform transform, @NotNull Rectangle2D rect) static @NotNull Rectangle2DconvertBounds(@NotNull RenderContext context, @NotNull Rectangle2D r, @NotNull GeometryUtil.Space from, @NotNull GeometryUtil.Space to) static @NotNull AffineTransformcreateInverse(@NotNull AffineTransform at) static doubledistanceSquared(double x1, double y1, double x2, double y2) static doublestatic doubledistanceSquared(Point2D.Float p1, Point2D.Float p2, float scaleX, float scaleY) static @NotNull Point2DgetLocation(@NotNull Rectangle2D r) static @NotNull Rectangle2Dgrow(@NotNull Rectangle2D bounds, double increase) static @NotNull Rectangle2Dgrow(@NotNull Rectangle2D bounds, FloatInsets grow) static floatleft(@NotNull Rectangle2D rect) static floatlerp(float t, float a, float b) static Point2D.Floatlerp(float t, Point2D.Float a, Point2D.Float b) static doublelineLength(double x1, double y1, double x2, double y2) static @NotNull FloatInsetsmax(@NotNull FloatInsets in1, @NotNull FloatInsets in2) static Point2D.Floatstatic @NotNull FloatInsetsmin(@NotNull FloatInsets in1, @NotNull FloatInsets in2) static booleannotablyGreater(double a, double b) static @NotNull FloatInsetsoverhangInsets(@NotNull Rectangle2D reference, @NotNull Rectangle2D bounds) static doublepathLength(@NotNull Shape shape) static floatright(@NotNull Rectangle2D rect) static doublescaleXOfTransform(@Nullable AffineTransform at) static doublescaleYOfTransform(@Nullable AffineTransform at) static @NotNull Rectangle2DtoIntegerBounds(@NotNull Rectangle2D in, @NotNull Rectangle2D out) static floattop(@NotNull Rectangle2D rect) static @NotNull Rectangle2DuserBoundsToDeviceBounds(@NotNull RenderContext context, @NotNull Rectangle2D r)
-
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
-
scaleYOfTransform
-
midPoint
-
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
-
distanceSquared
public static double distanceSquared(double x1, double y1, double x2, double y2) -
pathLength
-
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
-
top
-
right
-
bottom
-
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
-
toIntegerBounds
@NotNull public static @NotNull Rectangle2D toIntegerBounds(@NotNull @NotNull Rectangle2D in, @NotNull @NotNull Rectangle2D out) -
adjustForAliasing
-
createInverse
-
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
-