C# Класс Imgix_Dotnet.Rectangle

A rectangle represented by a Width and a Height
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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

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

CanHold() публичный Метод

Can this rectangle hold the subject rectangle
public CanHold ( Rectangle subject ) : bool
subject Rectangle The rectangle to compare to
Результат bool

EnsureFit() публичный Метод

Resizes this rectangle to fit inside a target rectangle
public EnsureFit ( Rectangle target ) : Rectangle
target Rectangle The target rectangle
Результат Rectangle

Match() публичный Метод

Resizes the rectangle to match the target rectangle on the shortest side
public Match ( Rectangle target ) : Rectangle
target Rectangle The target rectangle
Результат Rectangle

Ratio() публичный Метод

The ratio between this rectangle and a target rectangle
public Ratio ( Rectangle target ) : double
target Rectangle The rectangle to compare to
Результат double

Rectangle() публичный Метод

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
Результат System

Resize() публичный Метод

Resizes this rectangle by a ratio
public Resize ( double ratio ) : Rectangle
ratio double The ratio to resize the rectangle by
Результат Rectangle