C# Класс QualityBot.Util.RectangleUtil

Показать файл Открыть проект

Открытые методы

Метод Описание
AllZeroes ( Rectangle rectangle ) : bool

Returns true if the x, y, width, and height of the rectangle are zero.

AreaChange ( Rectangle r1, Rectangle r2 ) : decimal

Determines the area change from the first rectangle to the second.

AreaChangeAsPercent ( Rectangle r1, Rectangle r2 ) : decimal

Determines the area change from the first rectangle to the second.

AreaDifferenceBetweenRectangles ( Rectangle r1, Rectangle r2 ) : long

Calculates the area difference between two rectangles.

ChildrenAndIntersectingSiblings ( Rectangle rectangle, IEnumerable rectangles ) : IEnumerable

Returns all rectangles that intersect with the target rectangle.

DistanceBetweenRectangles ( Rectangle r1, Rectangle r2 ) : decimal

Calculates the distance between two rectangles.

PositiveDimensions ( Rectangle rectangle ) : bool

Returns true if the width and height of the rectangle are greater than zero.

PositiveOrZeroCoordinates ( Rectangle rectangle ) : bool

Returns true if the x and y of the rectangle are greater than or equal to zero.

Описание методов

AllZeroes() публичный статический Метод

Returns true if the x, y, width, and height of the rectangle are zero.
public static AllZeroes ( Rectangle rectangle ) : bool
rectangle System.Drawing.Rectangle The rectangle.
Результат bool

AreaChange() публичный статический Метод

Determines the area change from the first rectangle to the second.
public static AreaChange ( Rectangle r1, Rectangle r2 ) : decimal
r1 System.Drawing.Rectangle The first rectangle.
r2 System.Drawing.Rectangle The second rectangle.
Результат decimal

AreaChangeAsPercent() публичный статический Метод

Determines the area change from the first rectangle to the second.
public static AreaChangeAsPercent ( Rectangle r1, Rectangle r2 ) : decimal
r1 System.Drawing.Rectangle The first rectangle.
r2 System.Drawing.Rectangle The second rectangle.
Результат decimal

AreaDifferenceBetweenRectangles() публичный статический Метод

Calculates the area difference between two rectangles.
public static AreaDifferenceBetweenRectangles ( Rectangle r1, Rectangle r2 ) : long
r1 System.Drawing.Rectangle The first rectangle.
r2 System.Drawing.Rectangle The second rectangle.
Результат long

ChildrenAndIntersectingSiblings() публичный статический Метод

Returns all rectangles that intersect with the target rectangle.
public static ChildrenAndIntersectingSiblings ( Rectangle rectangle, IEnumerable rectangles ) : IEnumerable
rectangle System.Drawing.Rectangle The target rectangle.
rectangles IEnumerable The candidate rectangles.
Результат IEnumerable

DistanceBetweenRectangles() публичный статический Метод

Calculates the distance between two rectangles.
public static DistanceBetweenRectangles ( Rectangle r1, Rectangle r2 ) : decimal
r1 System.Drawing.Rectangle The first rectangle.
r2 System.Drawing.Rectangle The second rectangle.
Результат decimal

PositiveDimensions() публичный статический Метод

Returns true if the width and height of the rectangle are greater than zero.
public static PositiveDimensions ( Rectangle rectangle ) : bool
rectangle System.Drawing.Rectangle The rectangle.
Результат bool

PositiveOrZeroCoordinates() публичный статический Метод

Returns true if the x and y of the rectangle are greater than or equal to zero.
public static PositiveOrZeroCoordinates ( Rectangle rectangle ) : bool
rectangle System.Drawing.Rectangle The rectangle.
Результат bool