public class CanvasSize
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
double |
maxx
Maximum X
|
double |
maxy
Maximum Y
|
double |
minx
Minimum X
|
double |
miny
Minimum Y
|
Constructor and Description |
---|
CanvasSize(double minx,
double maxx,
double miny,
double maxy)
Constructor.
|
Modifier and Type | Method and 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() |
public final double minx
public final double maxx
public final double miny
public final double maxy
public CanvasSize(double minx, double maxx, double miny, double maxy)
minx
- Minimum Xmaxx
- Maximum Xminy
- Minimum Ymaxy
- Maximum Ypublic double getMinX()
public double getMaxX()
public double getMinY()
public double getMaxY()
public double getDiffX()
public double getDiffY()
public double continueToMargin(double[] origin, double[] delta)
origin
- Origin pointdelta
- Direction vectorpublic boolean clipToMargin(double[] origin, double[] target)
origin
- Origin point, will be modifiedtarget
- Target point, will be modifiedfalse
if entirely outside the marginpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.