Measure and scale an SVG image

This sample shows how to measure and scale the actual content of an SVG image in which the content is offset within the viewport. See comments in code for details.