public class ScaleFactorInt extends Object
ScaleFactor
but only allows integer scaling-factors in each dimension.Constructor and Description |
---|
ScaleFactorInt(int x,
int y) |
Modifier and Type | Method and Description |
---|---|
ScaleFactor |
asScaleFactor()
Converts to a
ScaleFactor that accepts floating-point values. |
Extent |
scale(Extent extent)
Multiplies an
Extent by the respective scaling-factor in each dimension. |
Point2i |
scale(int x,
int y)
Multiplies a point by the respective scaling-factor in each dimension.
|
Point2i |
scale(Point2i point)
Multiplies a
Point2i by the respective scaling-factor in each dimension. |
public ScaleFactor asScaleFactor()
ScaleFactor
that accepts floating-point values.ScaleFactor
containing identical scaling values.public Point2i scale(int x, int y)
x
- the point to be scaled in the X-dimension.y
- the point to be scaled in the Y-dimension.Point2i
.public Point2i scale(Point2i point)
Point2i
by the respective scaling-factor in each dimension.point
- the point to be scaled.Point2i
.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.