C# Class CUE.NET.Helper.RectangleHelper

Afficher le fichier Open project: DarthAffe/CUE.NET

Méthodes publiques

Méthode Description
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.

Method Details

CalculateIntersectPercentage() public static méthode

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.
Résultat float

CreateRectangleFromPoints() public static méthode

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.
Résultat System.Drawing.RectangleF

CreateRectangleFromRectangles() public static méthode

Creates a rectangle containing n other rectangles.
public static CreateRectangleFromRectangles ( IEnumerable rectangles ) : RectangleF
rectangles IEnumerable The list of rectangles.
Résultat System.Drawing.RectangleF

CreateRectangleFromRectangles() public static méthode

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.
Résultat System.Drawing.RectangleF

GetCenter() public static méthode

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
Résultat System.Drawing.PointF

Move() public static méthode

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
Résultat System.Drawing.RectangleF