Get the dimensions of an SVG element
get_element_dimensions(
element,
doc_unit,
dpi = 150,
call = rlang::caller_env()
)A list with x, y, width, and height of the element
An xml2 node corresponding to an SVG element
The unit used in the SVG document (e.g., "px", "mm", "cm", "in")
The resolution to use when interpreting pixel units
The calling environment for error reporting
The function expects the element to have 'x', 'y', 'width', and 'height' attributes.