dimensions::fit($box, $force = false)

Recalculates the width and height to fit into the given box.

  • $box (int)
    the max width and/or height
  • $force (boolean)
    If true, the dimensions will be upscaled to fit the box if smaller
  • return (object)
    returns this object with recalculated dimensions

Is something missing or incorrect? Edit this page on Github…