aspectRatio property

double get aspectRatio

Implementation

double get aspectRatio {
  if (width == 0.0 || height == 0.0) {
    return 1.0;
  }
  return (rotation == 90 || rotation == 270)
      ? height / width
      : width / height;
}