public class PointRange extends Object
Constructor and Description |
---|
PointRange()
Creates a new point range at 0, 0 without areas around them
|
PointRange(int x,
int y)
Creates a new point range without margins around it
|
PointRange(Point center,
Point min,
Point max)
Creates a point range and initializes all values
|
PointRange(PointRange other) |
Modifier and Type | Method and Description |
---|---|
void |
add(Point point)
Adds the point's x and y coordinates to all points
|
static Point |
getTightenedTo(PointRange pointRange,
Point target)
Gets a point within the range that is closest to the target point
|
static Point |
getTightenedTo(PointRange pointRange,
PointRange target)
Gets a point within the range that is closest to the target point range
|
static void |
tighten(PointRange p0,
PointRange p1)
Modifies the center points, so they are closer together.
|
PointRange |
zoom(double zoom)
Apply scaling to all components and return the result.
|
public PointRange()
public PointRange(PointRange other)
public PointRange(int x, int y)
x
- x coordinatey
- y coordinatepublic static Point getTightenedTo(PointRange pointRange, Point target)
pointRange
- the point rangetarget
- the target pointpublic static Point getTightenedTo(PointRange pointRange, PointRange target)
pointRange
- the point rangetarget
- the target point rangepublic static void tighten(PointRange p0, PointRange p1)
p0
- the first pointp1
- the second pointpublic PointRange zoom(double zoom)
zoom
- the zoompublic void add(Point point)
point
- shift coordinateCopyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.