surround method

  1. @override
void surround(
  1. Mobject mob, {
  2. int dimToMatch = 0,
  3. bool stretch = false,
  4. double? buffer,
  5. double bufferFactor = 1.2,
})
override

Implementation

@override
void surround(Mobject mob,
    {int dimToMatch = 0,
    bool stretch = false,
    double? buffer,
    double bufferFactor = 1.2}) {
  replace(mob, dimToMatch: dimToMatch, stretch: stretch);

  if (buffer != null) {
    print(
        'the argument buffer when calling ${getName()}.surround is useless');
  }

  var w = getWidth();
  var h = getHeight();
  setWidth(sqrt(w * w + h * h));
  scaleUniformly(bufferFactor);
}