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
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.