Package elki.visualization.projections
Class CanvasSize
- java.lang.Object
-
- elki.visualization.projections.CanvasSize
-
public class CanvasSize extends java.lang.ObjectSize 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 booleanclipToMargin(double[] origin, double[] target)Clip a line on the margin (modifies arrays!)doublecontinueToMargin(double[] origin, double[] delta)Continue a line along a given direction to the margin.doublegetDiffX()doublegetDiffY()doublegetMaxX()doublegetMaxY()doublegetMinX()doublegetMinY()java.lang.StringtoString()
-
-
-
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:
falseif entirely outside the margin
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-