C# 클래스 QualityBot.Util.RectangleUtil

파일 보기 프로젝트 열기: Ancestry/quality-bot

공개 메소드들

메소드 설명
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