You'll need to set the preserveAspectRatio
attribute to none
. So it will be something like:
rootElement.setAttribute("preserveAspectRatio", "none");
I haven't used the batik library this way myself, but that's the DOM way of achieving this result.