// Set the image size to the size of the svg.
Point2D csize = new Point2D.Float(-1, -1);
Point2D intrinsicDimensions = child.getDimension(csize);
if (intrinsicDimensions == null) {
ResourceEventProducer eventProducer = ResourceEventProducer.Provider.get(
getUserAgent().getEventBroadcaster());
eventProducer.ifoNoIntrinsicSize(this, child.getLocator());
return;
}
size.setSizeInMillipoints(
(int)Math.round(intrinsicDimensions.getX() * 1000),
(int)Math.round(intrinsicDimensions.getY() * 1000));
size.calcPixelsFromSize();
info.setSize(size);
ImageXMLDOM image = new ImageXMLDOM(info, doc, ns);
FOUserAgent userAgent = ifo.getUserAgent();
ImageManager manager = userAgent.getFactory().getImageManager();
Map hints = ImageUtil.getDefaultHints(ua.getImageSessionContext());
Image converted = manager.convertImage(image, FLAVORS, hints);
putGraphic(ifo, converted);
} catch (ImageException ie) {
ResourceEventProducer eventProducer = ResourceEventProducer.Provider.get(
getUserAgent().getEventBroadcaster());
eventProducer.imageError(this, null, ie, null);
} catch (IOException ioe) {
ResourceEventProducer eventProducer = ResourceEventProducer.Provider.get(
getUserAgent().getEventBroadcaster());
eventProducer.imageIOError(this, null, ioe, null);
}
}