Package org.anchoranalysis.spatial.scale
Class ScaleFactorInt
Object
org.anchoranalysis.spatial.scale.ScaleFactorInt
public class ScaleFactorInt extends Object
Like
ScaleFactor but only allows integer scaling-factors in each dimension.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description ScaleFactorInt(int x, int y) -
Method Summary
Modifier and Type Method Description ScaleFactorasScaleFactor()Converts to aScaleFactorthat accepts floating-point values.Point2iscale(int x, int y)Multiplies a point by the respective scaling-factor in each dimension.Extentscale(Extent extent)Multiplies anExtentby the respective scaling-factor in each dimension.Point2iscale(Point2i point)Multiplies aPoint2iby the respective scaling-factor in each dimension.
-
Constructor Details
-
ScaleFactorInt
public ScaleFactorInt(int x, int y)
-
-
Method Details
-
asScaleFactor
Converts to aScaleFactorthat accepts floating-point values.- Returns:
- a newly created
ScaleFactorcontaining identical scaling values.
-
scale
Multiplies a point by the respective scaling-factor in each dimension.- Parameters:
x- the point to be scaled in the X-dimension.y- the point to be scaled in the Y-dimension.- Returns:
- a newly created scaled
Point2i.
-
scale
Multiplies aPoint2iby the respective scaling-factor in each dimension.- Parameters:
point- the point to be scaled.- Returns:
- a newly created scaled
Point2i.
-
scale
Multiplies anExtentby the respective scaling-factor in each dimension.- Parameters:
extent- the extent to be scaled.- Returns:
- a newly created scaled
Extent.
-