Package org.libjpegturbo.turbojpeg
Class TJScalingFactor
- java.lang.Object
- 
- org.libjpegturbo.turbojpeg.TJScalingFactor
 
- 
 public class TJScalingFactor extends java.lang.ObjectFractional scaling factor
- 
- 
Constructor SummaryConstructors Constructor Description TJScalingFactor(int num, int denom)Create a TurboJPEG scaling factor instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(TJScalingFactor other)Returns true or false, depending on whether this instance andotherhave the same numerator and denominator.intgetDenom()Returns denominatorintgetNum()Returns numeratorintgetScaled(int dimension)Returns the scaled value ofdimension.booleanisOne()Returns true or false, depending on whether this instance is equal to 1/1.
 
- 
- 
- 
Method Detail- 
getNumpublic int getNum() Returns numerator- Returns:
- numerator
 
 - 
getDenompublic int getDenom() Returns denominator- Returns:
- denominator
 
 - 
getScaledpublic int getScaled(int dimension) Returns the scaled value ofdimension. This function performs the integer equivalent ofceil(dimension * scalingFactor).- Parameters:
- dimension- width or height to multiply by this scaling factor
- Returns:
- the scaled value of dimension.
 
 - 
equalspublic boolean equals(TJScalingFactor other) Returns true or false, depending on whether this instance andotherhave the same numerator and denominator.- Parameters:
- other- the scaling factor against which to compare this one
- Returns:
- true or false, depending on whether this instance and
 otherhave the same numerator and denominator.
 
 - 
isOnepublic 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.
 
 
- 
 
-