IntRect.fromLTRB constructor

IntRect.fromLTRB(
  1. int left,
  2. int top,
  3. int right,
  4. int bottom,
)

Creates a new IntRect from left, top, right, and bottom edges.

left The x-coordinate of the left edge. top The y-coordinate of the top edge. right The x-coordinate of the right edge. bottom The y-coordinate of the bottom edge.

Implementation

factory IntRect.fromLTRB(
  final int left,
  final int top,
  final int right,
  final int bottom,
) {
  return IntRect(left, top, right - left, bottom - top);
}