RendererContext context = createRendererContext(
x, y, width, height, foreignAttributes);
getGraphics2DAdapter().paintImage(imageG2D.getGraphics2DImagePainter(),
context, x, y, width, height);
} else if (img instanceof ImageRendered) {
ImageRendered imgRend = (ImageRendered)img;
AffineTransform at = new AffineTransform();
at.translate(x / 1000f, y / 1000f);
double sx = pos.getWidth() / info.getSize().getWidthMpt();
double sy = pos.getHeight() / info.getSize().getHeightMpt();
sx *= userAgent.getSourceResolution() / info.getSize().getDpiHorizontal();
sy *= userAgent.getSourceResolution() / info.getSize().getDpiVertical();
at.scale(sx, sy);
state.getGraph().drawRenderedImage(imgRend.getRenderedImage(), at);
} else if (img instanceof ImageXMLDOM) {
ImageXMLDOM imgXML = (ImageXMLDOM)img;
renderDocument(imgXML.getDocument(), imgXML.getRootNamespace(),
pos, foreignAttributes);
}