C# 클래스 Imgix_Dotnet.Rectangle

A rectangle represented by a Width and a Height
파일 보기 프로젝트 열기: estei/Imgix-Dotnet 1 사용 예제들

공개 메소드들

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