containsPoint method - CssRect class - dart:html library (original) (raw)

description

bool containsPoint(

  1. Point<num> another )

Tests whether another is inside or along the edges of this.

Implementation

bool containsPoint(Point<num> another) {
  return another.x >= left &&
      another.x <= left + width &&
      another.y >= top &&
      another.y <= top + height;
}