MapRectangle class
An immutable rectangle defined by four double coordinates in map pixels.
Constructors
- MapRectangle(double left, double top, double right, double bottom)
-
Creates a new
MapRectangle.const -
MapRectangle.from(List<
Mappoint> mp1) -
Creates a new
MapRectanglethat encloses all the given points.factory - MapRectangle.zero()
-
Creates a new
MapRectangleat the origin with zero width and height.const
Properties
Methods
-
contains(
Mappoint point) → bool -
Returns true if this rectangle contains the given
point. -
enlarge(
double left, double top, double right, double bottom) → MapRectangle -
Creates a new
MapRectangleby enlarging this rectangle by the given amounts. -
envelope(
double padding) → MapRectangle -
Creates a new
MapRectangleby adding apaddingto all sides. -
getCenter(
) → Mappoint - Returns the center point of this rectangle.
-
getCenterX(
) → double - Returns the horizontal center of this rectangle.
-
getCenterY(
) → double - Returns the vertical center of this rectangle.
-
getHeight(
) → double - Returns the height of this rectangle.
-
getLeftUpper(
) → Mappoint - Returns the top-left corner of this rectangle.
-
getRightLower(
) → Mappoint - Returns the bottom-right corner of this rectangle.
-
getWidth(
) → double - Returns the width of this rectangle.
-
intersects(
MapRectangle rectangle) → bool -
Returns true if this rectangle intersects with the given
rectangle. -
intersectsCircle(
double pointX, double pointY, double radius) → bool -
Returns true if this rectangle intersects with a circle defined by its center
(
pointX,pointY) andradius. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offset(
Mappoint reference) → MapRectangle -
Creates a new
MapRectangleby offsetting this rectangle by the givenreferencepoint. -
shift(
Mappoint reference) → MapRectangle -
Creates a new
MapRectangleby shifting this rectangle by the givenreferencepoint. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited