C# Класс CUE.NET.Helper.RectangleHelper

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

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

Метод Описание
CalculateIntersectPercentage ( RectangleF rect, RectangleF referenceRect ) : float

Calculates the percentage of the intersection of two rectangles.

CreateRectangleFromPoints ( PointF point1, PointF point2 ) : RectangleF

Creates a rectangle from two corner points.

CreateRectangleFromRectangles ( IEnumerable rectangles ) : RectangleF

Creates a rectangle containing n other rectangles.

CreateRectangleFromRectangles ( RectangleF rectangle1, RectangleF rectangle2 ) : RectangleF

Creates a rectangle containing two other rectangles.

GetCenter ( this rectangle, float offsetX = 0f, float offsetY = 0f ) : PointF

Calculates the center-point of a rectangle adding an offset.

Move ( this rectangle, float offsetX = 0f, float offsetY = 0f ) : RectangleF

Moves a rectangle by a adding an offset.

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

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

Calculates the percentage of the intersection of two rectangles.
public static CalculateIntersectPercentage ( RectangleF rect, RectangleF referenceRect ) : float
rect System.Drawing.RectangleF The rectangle from which the percentage should be calculated.
referenceRect System.Drawing.RectangleF The intersecting rectangle.
Результат float

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

Creates a rectangle from two corner points.
public static CreateRectangleFromPoints ( PointF point1, PointF point2 ) : RectangleF
point1 System.Drawing.PointF The first point.
point2 System.Drawing.PointF The second points.
Результат System.Drawing.RectangleF

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

Creates a rectangle containing n other rectangles.
public static CreateRectangleFromRectangles ( IEnumerable rectangles ) : RectangleF
rectangles IEnumerable The list of rectangles.
Результат System.Drawing.RectangleF

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

Creates a rectangle containing two other rectangles.
public static CreateRectangleFromRectangles ( RectangleF rectangle1, RectangleF rectangle2 ) : RectangleF
rectangle1 System.Drawing.RectangleF The first rectangle.
rectangle2 System.Drawing.RectangleF The second rectangle.
Результат System.Drawing.RectangleF

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

Calculates the center-point of a rectangle adding an offset.
public static GetCenter ( this rectangle, float offsetX = 0f, float offsetY = 0f ) : PointF
rectangle this The rectangle.
offsetX float The offset for the x-value
offsetY float The offset for the y-value
Результат System.Drawing.PointF

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

Moves a rectangle by a adding an offset.
public static Move ( this rectangle, float offsetX = 0f, float offsetY = 0f ) : RectangleF
rectangle this The rectangle.
offsetX float The offset for the x-value
offsetY float The offset for the y-value
Результат System.Drawing.RectangleF