C# Класс System.Drawing.Rectangle

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

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

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

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

Метод Описание
Ceiling ( RectangleF value ) : Rectangle

Converts a RectangleF to a Rectangle by performing a ceiling operation on all the coordinates.

Ceiling ( System value ) : System.Drawing.Rectangle
Contains ( System pt ) : bool
Equals ( object obj ) : bool

Tests whether obj is a with the same location and size of this Rectangle.

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

Creates a new with the specified location and size.

FromLTRB ( int left, int top, int right, int bottom ) : System.Drawing.Rectangle
GetHashCode ( ) : int
Inflate ( Rectangle rect, int x, int y ) : Rectangle

Creates a that is inflated by the specified amount.

Inflate ( System rect, int x, int y ) : System.Drawing.Rectangle
Inflate ( Size size ) : void

Inflates this by the specified amount.

Inflate ( System size ) : void
Inflate ( int width, int height ) : void

Inflates this by the specified amount.

Intersect ( Rectangle a, Rectangle b ) : Rectangle

Creates a rectangle that represents the intersection between a and b. If there is no intersection, null is returned.

Intersect ( System a, System b ) : System.Drawing.Rectangle
Intersect ( Rectangle rect ) : void

Creates a Rectangle that represents the intersection between this Rectangle and rect.

Intersect ( System rect ) : void
IntersectsWith ( System rect ) : bool
Offset ( Point pos ) : void

Adjusts the location of this rectangle by the specified amount.

Offset ( System pos ) : void
Offset ( int x, int y ) : void

Adjusts the location of this rectangle by the specified amount.

Rectangle ( System location, System size )
Rectangle ( int x, int y, int width, int height )
Rectangle ( Point location, Size size ) : System.Diagnostics.Contracts

Initializes a new instance of the Rectangle class with the specified location and size.

Rectangle ( int x, int y, int width, int height ) : System.Diagnostics.Contracts

Initializes a new instance of the class with the specified location and size.

Round ( RectangleF value ) : Rectangle

Converts a RectangleF to a Rectangle by performing a round operation on all the coordinates.

Round ( System value ) : System.Drawing.Rectangle
ToString ( ) : string

Converts the attributes of this to a human readable string.

Truncate ( RectangleF value ) : Rectangle

Converts a RectangleF to a Rectangle by performing a truncate operation on all the coordinates.

Truncate ( System value ) : System.Drawing.Rectangle
Union ( System a, System b ) : System.Drawing.Rectangle
operator ( ) : bool

Tests whether two objects have equal location and size.

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

Метод Описание
Contains ( Point pt ) : bool
Contains ( Rectangle rect ) : bool
Contains ( int x, int y ) : bool
IntersectsWith ( Rectangle rect ) : bool
Union ( Rectangle a, Rectangle b ) : Rectangle

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

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

Converts a RectangleF to a Rectangle by performing a ceiling operation on all the coordinates.
public static Ceiling ( RectangleF value ) : Rectangle
value RectangleF
Результат Rectangle

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

public static Ceiling ( System value ) : System.Drawing.Rectangle
value System
Результат System.Drawing.Rectangle

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

public Contains ( System pt ) : bool
pt System
Результат bool

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

Tests whether obj is a with the same location and size of this Rectangle.

public Equals ( object obj ) : bool
obj object
Результат bool

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

Creates a new with the specified location and size.
public static FromLTRB ( int left, int top, int right, int bottom ) : Rectangle
left int
top int
right int
bottom int
Результат Rectangle

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

public static FromLTRB ( int left, int top, int right, int bottom ) : System.Drawing.Rectangle
left int
top int
right int
bottom int
Результат System.Drawing.Rectangle

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

public GetHashCode ( ) : int
Результат int

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

Creates a that is inflated by the specified amount.

public static Inflate ( Rectangle rect, int x, int y ) : Rectangle
rect Rectangle
x int
y int
Результат Rectangle

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

public static Inflate ( System rect, int x, int y ) : System.Drawing.Rectangle
rect System
x int
y int
Результат System.Drawing.Rectangle

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

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

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

public Inflate ( System size ) : void
size System
Результат void

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

Inflates this by the specified amount.

public Inflate ( int width, int height ) : void
width int
height int
Результат void

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

Creates a rectangle that represents the intersection between a and b. If there is no intersection, null is returned.
public static Intersect ( Rectangle a, Rectangle b ) : Rectangle
a Rectangle
b Rectangle
Результат Rectangle

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

public static Intersect ( System a, System b ) : System.Drawing.Rectangle
a System
b System
Результат System.Drawing.Rectangle

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

Creates a Rectangle that represents the intersection between this Rectangle and rect.
public Intersect ( Rectangle rect ) : void
rect Rectangle
Результат void

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

public Intersect ( System rect ) : void
rect System
Результат void

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

public IntersectsWith ( System rect ) : bool
rect System
Результат bool

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

Adjusts the location of this rectangle by the specified amount.

public Offset ( Point pos ) : void
pos Point
Результат void

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

public Offset ( System pos ) : void
pos System
Результат void

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

Adjusts the location of this rectangle by the specified amount.
public Offset ( int x, int y ) : void
x int
y int
Результат void

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

public Rectangle ( System location, System size )
location System
size System

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

public Rectangle ( int x, int y, int width, int height )
x int
y int
width int
height int

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

Initializes a new instance of the Rectangle class with the specified location and size.

public Rectangle ( Point location, Size size ) : System.Diagnostics.Contracts
location Point
size Size
Результат System.Diagnostics.Contracts

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

Initializes a new instance of the class with the specified location and size.

public Rectangle ( int x, int y, int width, int height ) : System.Diagnostics.Contracts
x int
y int
width int
height int
Результат System.Diagnostics.Contracts

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

Converts a RectangleF to a Rectangle by performing a round operation on all the coordinates.
public static Round ( RectangleF value ) : Rectangle
value RectangleF
Результат Rectangle

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

public static Round ( System value ) : System.Drawing.Rectangle
value System
Результат System.Drawing.Rectangle

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

Converts the attributes of this to a human readable string.

public ToString ( ) : string
Результат string

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

Converts a RectangleF to a Rectangle by performing a truncate operation on all the coordinates.
public static Truncate ( RectangleF value ) : Rectangle
value RectangleF
Результат Rectangle

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

public static Truncate ( System value ) : System.Drawing.Rectangle
value System
Результат System.Drawing.Rectangle

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

public static Union ( System a, System b ) : System.Drawing.Rectangle
a System
b System
Результат System.Drawing.Rectangle

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

Tests whether two objects have equal location and size.

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

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

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

public static Rectangle Empty
Результат Rectangle

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

public static System.Drawing.Rectangle Empty
Результат System.Drawing.Rectangle