scale method

Size scale(
  1. double factor
)

Returns a new size with the width and height scaled by the given factor.

Implementation

Size scale(double factor) {
  return Size(width * factor, height * factor);
}