A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

Namespace: yWorks.yFiles.Util.Geom
Assembly: yWorks.yFilesWPF.Algorithms (in yWorks.yFilesWPF.Algorithms.dll) Version: 2.2.0.2 (2.2.0.2)

Syntax

C#
public class Rectangle : Rectangle2D
Visual Basic
Public Class Rectangle _
	Inherits Rectangle2D

Remarks

A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (x, y) in the coordinate space, its width, and its height.

The constructors that create a Rectangle, and the methods that can modify one, do not prevent setting a negative value for width or height.

A Rectangle whose width or height is negative is considered empty. If the Rectangle is empty, then the isEmpty method returns true. No point can be contained by or inside an empty Rectangle. The values of width and height, however, are still valid. An empty Rectangle still has a location in the coordinate space, and methods that change its size or location remain valid. The behavior of methods that operate on more than one Rectangle is undefined if any of the participating Rectangle objects has a negative width or height. These methods include intersects, intersection, and union.

Inheritance Hierarchy

System..::..Object
  yWorks.yFiles.Util.Geom..::..Rectangle2D
    yWorks.yFiles.Util.Geom..::..Rectangle

See Also