File: //lib/mysqlsh/lib/python3.8/site-packages/svg/_helpers.py
from __future__ import annotations
from ._types import Length, Number
def escape(text: str) -> str:
"""Make the text safe to use in SVG.
"""
text = text.replace("&", "&")
text = text.replace(">", ">")
text = text.replace("<", "<")
return text
def mm(val: Number) -> Length:
"""Explicitly specify mm unit for the value.
"""
return Length(value=val, unit='mm')
def px(val: Number) -> Length:
"""Explicitly specify px unit for the value.
"""
return Length(value=val, unit='px')