boolean paintAsBitmap = ImageHandlerUtil.isConversionModeBitmap(foreignAttributes);
info.setPaintAsBitmap(paintAsBitmap);
AFPForeignAttributeReader foreignAttributeReader
= new AFPForeignAttributeReader();
AFPResourceInfo resourceInfo
= foreignAttributeReader.getResourceInfo(foreignAttributes);
// set default resource level if an explicit one hasn't been set
if (!resourceInfo.levelChanged()) {
byte resourceType = paintAsBitmap
? ResourceObject.TYPE_IMAGE : ResourceObject.TYPE_GRAPHIC;
resourceInfo.setLevel(info.getResourceManager().getResourceLevelDefaults()
.getDefaultResourceLevel(resourceType));
}
info.setResourceInfo(resourceInfo);
}
return info;