C# Класс OpenTK.Graphics.Rectangle

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

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

Свойство Тип Описание
Empty Rectangle

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

Метод Описание
Contains ( Point pt ) : bool

Contains Method

Checks if a Point lies within this Rectangle.

Contains ( Rectangle rect ) : bool

Contains Method

Checks if a Rectangle lies entirely within this Rectangle.

Contains ( int x, int y ) : bool

Contains Method

Checks if an x,y coordinate lies within this Rectangle.

Equals ( object obj ) : bool

Equals Method

Checks equivalence of this Rectangle and another object.

FromLTRB ( int left, int top, int right, int bottom ) : Rectangle

FromLTRB Shared Method

Produces a Rectangle structure from left, top, right, and bottom coordinates.

GetHashCode ( ) : int

GetHashCode Method

Calculates a hashing value.

Inflate ( Rectangle rect, int x, int y ) : Rectangle

Inflate Shared Method

Produces a new Rectangle by inflating an existing Rectangle by the specified coordinate values.

Inflate ( Size size ) : void

Inflate Method

Inflates the Rectangle by a specified Size.

Inflate ( int width, int height ) : void

Inflate Method

Inflates the Rectangle by a specified width and height.

Intersect ( Rectangle a, Rectangle b ) : Rectangle

Intersect Shared Method

Produces a new Rectangle by intersecting 2 existing Rectangles. Returns null if there is no intersection.

Intersect ( Rectangle rect ) : void

Intersect Method

Replaces the Rectangle with the intersection of itself and another Rectangle.

IntersectsWith ( Rectangle rect ) : bool

IntersectsWith Method

Checks if a Rectangle intersects with this one.

Offset ( Point pos ) : void

Offset Method

Moves the Rectangle a specified distance.

Offset ( int x, int y ) : void

Offset Method

Moves the Rectangle a specified distance.

Rectangle ( Point location, Size size ) : System

Rectangle Constructor

Creates a Rectangle from Point and Size values.

Rectangle ( int x, int y, int width, int height ) : System

Rectangle Constructor

Creates a Rectangle from a specified x,y location and width and height values.

ToString ( ) : string

ToString Method

Formats the Rectangle as a string in (x,y,w,h) notation.

Union ( Rectangle a, Rectangle b ) : Rectangle

Union Shared Method

Produces a new Rectangle from the union of 2 existing Rectangles.

operator ( ) : bool

Equality Operator

Compares two Rectangle objects. The return value is based on the equivalence of the Location and Size properties of the two Rectangles.

Приватные методы

Метод Описание
IntersectsWithInclusive ( Rectangle r ) : bool

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

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

Contains Method
Checks if a Point lies within this Rectangle.
public Contains ( Point pt ) : bool
pt Point
Результат bool

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

Contains Method
Checks if a Rectangle lies entirely within this Rectangle.
public Contains ( Rectangle rect ) : bool
rect Rectangle
Результат bool

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

Contains Method
Checks if an x,y coordinate lies within this Rectangle.
public Contains ( int x, int y ) : bool
x int
y int
Результат bool

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

Equals Method
Checks equivalence of this Rectangle and another object.
public Equals ( object obj ) : bool
obj object
Результат bool

FromLTRB() публичный статический Метод

FromLTRB Shared Method
Produces a Rectangle structure from left, top, right, and bottom coordinates.
public static FromLTRB ( int left, int top, int right, int bottom ) : Rectangle
left int
top int
right int
bottom int
Результат Rectangle

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

GetHashCode Method
Calculates a hashing value.
public GetHashCode ( ) : int
Результат int

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

Inflate Shared Method
Produces a new Rectangle by inflating an existing Rectangle by the specified coordinate values.
public static Inflate ( Rectangle rect, int x, int y ) : Rectangle
rect Rectangle
x int
y int
Результат Rectangle

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

Inflate Method
Inflates the Rectangle by a specified Size.
public Inflate ( Size size ) : void
size Size
Результат void

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

Inflate Method
Inflates the Rectangle by a specified width and height.
public Inflate ( int width, int height ) : void
width int
height int
Результат void

Intersect() публичный статический Метод

Intersect Shared Method
Produces a new Rectangle by intersecting 2 existing Rectangles. Returns null if there is no intersection.
public static Intersect ( Rectangle a, Rectangle b ) : Rectangle
a Rectangle
b Rectangle
Результат Rectangle

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

Intersect Method
Replaces the Rectangle with the intersection of itself and another Rectangle.
public Intersect ( Rectangle rect ) : void
rect Rectangle
Результат void

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

IntersectsWith Method
Checks if a Rectangle intersects with this one.
public IntersectsWith ( Rectangle rect ) : bool
rect Rectangle
Результат bool

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

Offset Method
Moves the Rectangle a specified distance.
public Offset ( Point pos ) : void
pos Point
Результат void

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

Offset Method
Moves the Rectangle a specified distance.
public Offset ( int x, int y ) : void
x int
y int
Результат void

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

Rectangle Constructor
Creates a Rectangle from Point and Size values.
public Rectangle ( Point location, Size size ) : System
location Point
size Size
Результат System

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

Rectangle Constructor
Creates a Rectangle from a specified x,y location and width and height values.
public Rectangle ( int x, int y, int width, int height ) : System
x int
y int
width int
height int
Результат System

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

ToString Method
Formats the Rectangle as a string in (x,y,w,h) notation.
public ToString ( ) : string
Результат string

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

Union Shared Method
Produces a new Rectangle from the union of 2 existing Rectangles.
public static Union ( Rectangle a, Rectangle b ) : Rectangle
a Rectangle
b Rectangle
Результат Rectangle

operator() публичный статический Метод

Equality Operator
Compares two Rectangle objects. The return value is based on the equivalence of the Location and Size properties of the two Rectangles.
public static operator ( ) : bool
Результат bool

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

Empty публичное статическое свойство

Empty Shared Field
An uninitialized Rectangle Structure.
public static Rectangle,OpenTK.Graphics Empty
Результат Rectangle