Package elki.visualization.projections
Class CanvasSize
- java.lang.Object
-
- elki.visualization.projections.CanvasSize
-
public class CanvasSize extends java.lang.Object
Size of a canvas. A 2D bounding rectangle.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description CanvasSize(double minx, double maxx, double miny, double maxy)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
clipToMargin(double[] origin, double[] target)
Clip a line on the margin (modifies arrays!)double
continueToMargin(double[] origin, double[] delta)
Continue a line along a given direction to the margin.double
getDiffX()
double
getDiffY()
double
getMaxX()
double
getMaxY()
double
getMinX()
double
getMinY()
java.lang.String
toString()
-
-
-
Method Detail
-
getMinX
public double getMinX()
- Returns:
- the mininum X
-
getMaxX
public double getMaxX()
- Returns:
- the maximum X
-
getMinY
public double getMinY()
- Returns:
- the minimum Y
-
getMaxY
public double getMaxY()
- Returns:
- the maximum Y
-
getDiffX
public double getDiffX()
- Returns:
- the length on X
-
getDiffY
public double getDiffY()
- Returns:
- the length on Y
-
continueToMargin
public double continueToMargin(double[] origin, double[] delta)
Continue a line along a given direction to the margin.- Parameters:
origin
- Origin pointdelta
- Direction vector- Returns:
- scaling factor for delta vector
-
clipToMargin
public boolean clipToMargin(double[] origin, double[] target)
Clip a line on the margin (modifies arrays!)- Parameters:
origin
- Origin point, will be modifiedtarget
- Target point, will be modified- Returns:
false
if entirely outside the margin
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-