本文整理汇总了Java中com.drew.lang.Rational.toSimpleString方法的典型用法代码示例。如果您正苦于以下问题:Java Rational.toSimpleString方法的具体用法?Java Rational.toSimpleString怎么用?Java Rational.toSimpleString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.drew.lang.Rational
的用法示例。
在下文中一共展示了Rational.toSimpleString方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getExposureBiasDescription
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getExposureBiasDescription()
{
Rational value = _directory.getRational(TAG_EXPOSURE_BIAS);
if (value == null)
return null;
return value.toSimpleString(true) + " EV";
}
示例2: getCompressedAverageBitsPerPixelDescription
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getCompressedAverageBitsPerPixelDescription()
{
Rational value = _directory.getRational(TAG_COMPRESSED_AVERAGE_BITS_PER_PIXEL);
if (value == null)
return null;
String ratio = value.toSimpleString(_allowDecimalRepresentationOfRationals);
return value.isInteger() && value.intValue() == 1
? ratio + " bit/pixel"
: ratio + " bits/pixel";
}
示例3: getDigitalZoomDescription
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getDigitalZoomDescription()
{
Rational value = _directory.getRational(TAG_DIGITAL_ZOOM);
return value == null
? null
: value.getNumerator() == 0
? "No digital zoom"
: value.toSimpleString(true) + "x digital zoom";
}
示例4: getDigitalZoomDescription
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getDigitalZoomDescription()
{
Rational value = _directory.getRational(TAG_DIGITAL_ZOOM);
if (value==null)
return null;
return value.intValue() == 1
? "No digital zoom"
: value.toSimpleString(true) + "x digital zoom";
}
示例5: getDigitalZoomDescription
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getDigitalZoomDescription()
{
Rational value = _directory.getRational(TAG_DIGITAL_ZOOM);
if (value == null)
return null;
return value.toSimpleString(false);
}
示例6: getSimpleRational
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
protected String getSimpleRational(final int tagType)
{
Rational value = _directory.getRational(tagType);
if (value == null)
return null;
return value.toSimpleString(true);
}
示例7: getRationalOrDoubleString
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
protected String getRationalOrDoubleString(int tagType)
{
Rational rational = _directory.getRational(tagType);
if (rational != null)
return rational.toSimpleString(true);
Double d = _directory.getDoubleObject(tagType);
if (d != null) {
DecimalFormat format = new DecimalFormat("0.###");
return format.format(d);
}
return null;
}
示例8: getXResolutionDescription
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getXResolutionDescription()
{
Rational value = _directory.getRational(TAG_X_RESOLUTION);
if (value == null)
return null;
final String unit = getResolutionDescription();
return value.toSimpleString(_allowDecimalRepresentationOfRationals) +
" dots per " +
(unit == null ? "unit" : unit.toLowerCase());
}
示例9: getFocusDescription
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getFocusDescription()
{
Rational value = _directory.getRational(TAG_FOCUS);
return value == null
? null
: value.getNumerator() == 1 && value.getDenominator() == 0
? "Infinite"
: value.toSimpleString(true);
}
示例10: getYResolutionDescription
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getYResolutionDescription()
{
Rational value = _directory.getRational(TAG_Y_RESOLUTION);
if (value == null)
return null;
final String unit = getResolutionDescription();
return value.toSimpleString(_allowDecimalRepresentationOfRationals) +
" dots per " +
(unit == null ? "unit" : unit.toLowerCase());
}
示例11: getFlashExposureValueDescription
import com.drew.lang.Rational; //导入方法依赖的package包/类
@Nullable
public String getFlashExposureValueDescription()
{
Rational value = _directory.getRational(TAG_FLASH_EV);
return value == null ? null : value.toSimpleString(false) + " EV (Apex)";
}