C# Класс Sparrow.Geom.Rectangle

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Height float
Width float
X float
Y float

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

Метод Описание
Contains ( Point point ) : bool
Contains ( Rectangle rectangle ) : bool
Contains ( float x, float y ) : bool
Copy ( ) : Rectangle
CopyFromRectangle ( Rectangle rectangle ) : void
Empty ( ) : void
Inflate ( float dx, float dy ) : void
Intersection ( Rectangle rectangle ) : Rectangle

Returns the intersecting rectangle

Intersects ( Rectangle rectangle ) : bool
IsEmpty ( ) : bool
IsEqual ( Rectangle other ) : bool

Determines whether this instance is equal the specified other with a small Epsilon error margin.

Normalize ( ) : void

Inverts X or Y if they are negative

Rectangle ( float x = 0.0f, float y = 0.0f, float width = 0.0f, float height = 0.0f ) : System
Union ( Rectangle rectangle ) : Rectangle

Returns a rectangle that encompasses both rectangles

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

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

public Contains ( Point point ) : bool
point Point
Результат bool

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

public Contains ( Rectangle rectangle ) : bool
rectangle Rectangle
Результат bool

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

public Contains ( float x, float y ) : bool
x float
y float
Результат bool

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

public Copy ( ) : Rectangle
Результат Rectangle

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

public CopyFromRectangle ( Rectangle rectangle ) : void
rectangle Rectangle
Результат void

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

public Empty ( ) : void
Результат void

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

public Inflate ( float dx, float dy ) : void
dx float
dy float
Результат void

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

Returns the intersecting rectangle
public Intersection ( Rectangle rectangle ) : Rectangle
rectangle Rectangle
Результат Rectangle

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

public Intersects ( Rectangle rectangle ) : bool
rectangle Rectangle
Результат bool

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

public IsEmpty ( ) : bool
Результат bool

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

Determines whether this instance is equal the specified other with a small Epsilon error margin.
public IsEqual ( Rectangle other ) : bool
other Rectangle
Результат bool

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

Inverts X or Y if they are negative
public Normalize ( ) : void
Результат void

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

public Rectangle ( float x = 0.0f, float y = 0.0f, float width = 0.0f, float height = 0.0f ) : System
x float
y float
width float
height float
Результат System

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

Returns a rectangle that encompasses both rectangles
public Union ( Rectangle rectangle ) : Rectangle
rectangle Rectangle
Результат Rectangle

Описание свойств

Height публичное свойство

public float Height
Результат float

Width публичное свойство

public float Width
Результат float

X публичное свойство

public float X
Результат float

Y публичное свойство

public float Y
Результат float