SVG and Canvas both use the same function to set percentages