paintBounds function

Rect paintBounds(
  1. RenderBox renderBox, [
  2. RenderObject? ancestor
])

Implementation

Rect paintBounds(RenderBox renderBox, [ RenderObject? ancestor ]) {
  final transformation = renderBox.getTransformTo(ancestor);
  final rect = renderBox.paintBounds;
  final leftTop = transformation.transform3(Vector3(rect.left, rect.top, 0));
  final rightBottom = transformation.transform3(Vector3(rect.right, rect.bottom, 0));
  return Rect.fromLTRB(leftTop.x, leftTop.y, rightBottom.x, rightBottom.y);
}