* @return The scaling factor that should be applied to the intrinsic
* width of the content.
*/
public float getContentWidth(final FObj fobj, final FoContext context,
final FObjScaled fobjScaled) {
final PdContentWidth property = (PdContentWidth) getProperty(
FoProperty.CONTENT_WIDTH);
if (property == null) {
/* Width scaling is not set. If we are scaling uniformly, use the
* height scaling if available. */
if (fobj.scalingUniform(context)) {
final PdContentHeight heightProperty =
(PdContentHeight) getProperty(
FoProperty.CONTENT_HEIGHT);
if (heightProperty == null) {
return AbstractContentDimension.getValueNoInstance();
} else {
return heightProperty.getValue(context, fobj, fobjScaled);
}
} else {
/* Scaling is not uniform. Just return the default. */
return AbstractContentDimension.getValueNoInstance();
}
} else {
return property.getValue(context, fobj, fobjScaled);
}
}