java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html
Package org.libjpegturbo.turbojpeg
java.lang.Object
public classTJScalingFactorextends java.lang.Object
Fractional scaling factor
Constructors | Constructor | Description |
| --- | --- |
| TJScalingFactor(int num, int denom) |
Create a TurboJPEG scaling factor instance.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| boolean | equals(TJScalingFactor other) |
Returns true or false, depending on whether this instance and other have the same numerator and denominator.
|
| int | getDenom() |
Returns denominator
|
| int | getNum() |
Returns numerator
|
| int | getScaled(int dimension) |
Returns the scaled value of dimension.
|
| boolean | isOne() |
Returns true or false, depending on whether this instance is equal to 1/1.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public TJScalingFactor(int num,
int denom)
Create a TurboJPEG scaling factor instance.
Parameters:num - numeratordenom - denominator
-
public int getNum()
Returns numerator Returns:numerator
-
public int getDenom()
Returns denominator Returns:denominator
-
public int getScaled(int dimension)
Returns the scaled value of dimension. This method performs the integer equivalent of Math.ceil(dimension * scalingFactor).
Parameters:dimension - width or height to multiply by this scaling factorReturns:the scaled value of dimension.
-
public boolean equals([TJScalingFactor](TJScalingFactor.html "class in org.libjpegturbo.turbojpeg")other)
Returns true or false, depending on whether this instance and other have the same numerator and denominator.
Parameters:other - the scaling factor against which to compare this oneReturns:true or false, depending on whether this instance and other have the same numerator and denominator.
-
public boolean isOne()
Returns true or false, depending on whether this instance is equal to 1/1. Returns:true or false, depending on whether this instance is equal to 1/1.