in platf-skia/src/commonMain/kotlin/org/jetbrains/letsPlot/skia/mapping/svg/SvgSkiaPeer.kt [93:114]
override fun getBBox(element: SvgLocatable): DoubleRectangle {
ensureSourceRegistered(element as SvgNode)
val target = myMappingMap[element]!!.target
if (target is Container) {
breadthFirstTraversal(target).forEach {
if (it is Text) {
it.layoutChildren()
}
}
}
val localBounds = target.localBounds
return localBounds.let {
DoubleRectangle(
it.left.toDouble(),
it.top.toDouble(),
it.width.toDouble(),
it.height.toDouble()
)
}
}