I am using Aspose.SVG_21.3.0 net40-client and this is my generated svg.
<svg xmlns="http://www.w3.org/2000/svg" id="AFO010-1-001_VK" width="372.5046" height="184.3707">
<g id="AFO010-1-001_VK_layout" transform="translate(1414.315 -70.80673)">
<g id="AFO010/1/001 VK_object" transform="rotate(335.8554 -1235.857 82.702)">
<rect id="AFO010/1/001 VK_base" x="-1342.37912213802" y="-1.14887940883636" width="213.04345703125" height="167.701858520508" stroke="#FF0000" stroke-width="5" fill="#FFFFFF" fill-opacity="0"/>
<g id="AFO010/1/001 VK_label" transform="rotate(39.14461 -1364.183 284.354)">
<rect id="AFO010/1/001 VK_labelbackground" fill="LightGrey" stroke="#010101" stroke-width="0.5" x="-1409.34365308285" y="275.846970677376" width="90.32323" height="12.15332"/>
<text id="AFO010/1/001 VK_labeltext" font-family="Verdana" font-size="10" font-weight="bold" fill="#000000" dominant-baseline="mathematical" x="-1407.34365308285" y="280.708298325539">AFO010/1/001</text>
</g>
</g>
</g>
</svg>
I am calling
svgDoc.RootElement.GetBBox()
on the root element of the svg document and getting this
<rect id="calculatedBoundingBox" x="-1414.315" y="70.80673" width="372.5046" height="184.3707" stroke="Yellow" stroke-width="1"/>
as calculated BoundingBox.
Integrated into the svg it looks like this
<svg xmlns="http://www.w3.org/2000/svg" id="AFO010-1-001_VK" width="372.5046" height="184.3707">
<g id="AFO010-1-001_VK_layout" transform="translate(1414.315 -70.80673)">
<rect id="calculatedBoundingBox" x="-1414.315" y="70.80673" width="372.5046" height="184.3707" stroke="Yellow" stroke-width="1"/>
<g id="AFO010/1/001 VK_object" transform="rotate(335.8554 -1235.857 82.702)">
<rect id="AFO010/1/001 VK_base" x="-1342.37912213802" y="-1.14887940883636" width="213.04345703125" height="167.701858520508" stroke="#FF0000" stroke-width="5" fill="#FFFFFF" fill-opacity="0"/>
<g id="AFO010/1/001 VK_label" transform="rotate(39.14461 -1364.183 284.354)">
<rect id="AFO010/1/001 VK_labelbackground" fill="LightGrey" stroke="#010101" stroke-width="0.5" x="-1409.34365308285" y="275.846970677376" width="90.32323" height="12.15332"/>
<text id="AFO010/1/001 VK_labeltext" font-family="Verdana" font-size="10" font-weight="bold" fill="#000000" dominant-baseline="mathematical" x="-1407.34365308285" y="280.708298325539">AFO010/1/001</text>
</g>
</g>
</g>
</svg>
The calculatedBoundingBox looks very weird. It is not what I expected as BoundingBox for the given content.
Am I doing something wrong or is it a bug in the calculation of the BoundingBox?
Could you help me out, please?
Thanks in advance.
Best Regards
Joern