C# Class Imgix_Dotnet.Rectangle

A rectangle represented by a Width and a Height
Afficher le fichier Open project: estei/Imgix-Dotnet Class Usage Examples

Méthodes publiques

Méthode Description
CanHold ( Rectangle subject ) : bool

Can this rectangle hold the subject rectangle

EnsureFit ( Rectangle target ) : Rectangle

Resizes this rectangle to fit inside a target rectangle

Match ( Rectangle target ) : Rectangle

Resizes the rectangle to match the target rectangle on the shortest side

Ratio ( Rectangle target ) : double

The ratio between this rectangle and a target rectangle

Rectangle ( int width, int height ) : System

Initializes a new Rectangle object with a set width and height

Resize ( double ratio ) : Rectangle

Resizes this rectangle by a ratio

Method Details

CanHold() public méthode

Can this rectangle hold the subject rectangle
public CanHold ( Rectangle subject ) : bool
subject Rectangle The rectangle to compare to
Résultat bool

EnsureFit() public méthode

Resizes this rectangle to fit inside a target rectangle
public EnsureFit ( Rectangle target ) : Rectangle
target Rectangle The target rectangle
Résultat Rectangle

Match() public méthode

Resizes the rectangle to match the target rectangle on the shortest side
public Match ( Rectangle target ) : Rectangle
target Rectangle The target rectangle
Résultat Rectangle

Ratio() public méthode

The ratio between this rectangle and a target rectangle
public Ratio ( Rectangle target ) : double
target Rectangle The rectangle to compare to
Résultat double

Rectangle() public méthode

Initializes a new Rectangle object with a set width and height
public Rectangle ( int width, int height ) : System
width int The width
height int The height
Résultat System

Resize() public méthode

Resizes this rectangle by a ratio
public Resize ( double ratio ) : Rectangle
ratio double The ratio to resize the rectangle by
Résultat Rectangle