Class ScaleFactorInt
Object
ScaleFactorInt
Like
ScaleFactor but only allows integer scaling-factors in each dimension.- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts to aScaleFactorthat accepts floating-point values.scale(int x, int y) Multiplies a point by the respective scaling-factor in each dimension.Multiplies anExtentby the respective scaling-factor in each dimension.Multiplies aPoint2iby the respective scaling-factor in each dimension.
-
Constructor Details
-
ScaleFactorInt
public ScaleFactorInt(int x, int y) Creates a newScaleFactorIntinstance.- Parameters:
x- How much to multiply the existing x-dimension by to create a scaled x-dimension.y- How much to multiply the existing y-dimension by to create a scaled y-dimension.
-
-
Method Details
-
asScaleFactor
Converts to aScaleFactorthat accepts floating-point values.- Returns:
- a newly created
ScaleFactorcontaining identical scaling values.
-
scale
-
scale
-
scale
-