scaleToWidth method

Rect scaleToWidth(
  1. double width
)

Scale so the new width equals width; aspect preserved, center fixed.

Implementation

Rect scaleToWidth(double width) => scale(width / this.width);