*
* @param dataObjectInfo
* the object area info
*/
public void setViewport(AFPDataObjectInfo dataObjectInfo) {
AFPObjectAreaInfo objectAreaInfo = dataObjectInfo.getObjectAreaInfo();
// object area descriptor
int width = objectAreaInfo.getWidth();
int height = objectAreaInfo.getHeight();
int widthRes = objectAreaInfo.getWidthRes();
int heightRes = objectAreaInfo.getHeightRes();
ObjectAreaDescriptor objectAreaDescriptor = factory.createObjectAreaDescriptor(width,
height, widthRes, heightRes);
getObjectEnvironmentGroup().setObjectAreaDescriptor(objectAreaDescriptor);
// object area position
AFPResourceInfo resourceInfo = dataObjectInfo.getResourceInfo();
AFPResourceLevel resourceLevel = resourceInfo.getLevel();
ObjectAreaPosition objectAreaPosition = null;
int rotation = objectAreaInfo.getRotation();
if (resourceLevel.isInline()) {
int x = objectAreaInfo.getX();
int y = objectAreaInfo.getY();
objectAreaPosition = factory.createObjectAreaPosition(x, y, rotation);
} else {
// positional values are specified in the oaOffset of the include object
objectAreaPosition = factory.createObjectAreaPosition(0, 0, rotation);
}