width property

num width
inherited

The width of this display object with the applied transformation.

Setting the width may change the scaleX, scaleY, skewX and skewY properties, depending on the previously applied transformation.

Implementation

num get width => boundsTransformed.width;
void width= (num value)
inherited

Implementation

set width(num value) {
  var bounds = this.bounds;
  var matrix = transformationMatrix;
  var boundsTransformed = matrix.transformRectangle(bounds, bounds);
  var scale = value / boundsTransformed.width;
  var ma = scale.isFinite ? matrix.a * scale : 1.0;
  var mc = scale.isFinite ? matrix.c * scale : 0.0;
  _reverseMatrix(ma, matrix.b, mc, matrix.d);
}