C# Class System.Drawing.Rectangle

Datei anzeigen Open project: dotnet/corefx Class Usage Examples

Public Properties

Property Type Description
Empty Rectangle
Empty System.Drawing.Rectangle

Public Methods

Method Description
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.

Private Methods

Method Description
Contains ( Point pt ) : bool
Contains ( Rectangle rect ) : bool
Contains ( int x, int y ) : bool
IntersectsWith ( Rectangle rect ) : bool
Union ( Rectangle a, Rectangle b ) : Rectangle

Method Details

Ceiling() public static method

Converts a RectangleF to a Rectangle by performing a ceiling operation on all the coordinates.
public static Ceiling ( RectangleF value ) : Rectangle
value RectangleF
return Rectangle

Ceiling() public static method

public static Ceiling ( System value ) : System.Drawing.Rectangle
value System
return System.Drawing.Rectangle

Contains() public method

public Contains ( System pt ) : bool
pt System
return bool

Equals() public method

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

public Equals ( object obj ) : bool
obj object
return bool

FromLTRB() public static method

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
return Rectangle

FromLTRB() public static method

public static FromLTRB ( int left, int top, int right, int bottom ) : System.Drawing.Rectangle
left int
top int
right int
bottom int
return System.Drawing.Rectangle

GetHashCode() public method

public GetHashCode ( ) : int
return int

Inflate() public static method

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
return Rectangle

Inflate() public static method

public static Inflate ( System rect, int x, int y ) : System.Drawing.Rectangle
rect System
x int
y int
return System.Drawing.Rectangle

Inflate() public method

Inflates this by the specified amount.
public Inflate ( Size size ) : void
size Size
return void

Inflate() public method

public Inflate ( System size ) : void
size System
return void

Inflate() public method

Inflates this by the specified amount.

public Inflate ( int width, int height ) : void
width int
height int
return void

Intersect() public static method

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
return Rectangle

Intersect() public static method

public static Intersect ( System a, System b ) : System.Drawing.Rectangle
a System
b System
return System.Drawing.Rectangle

Intersect() public method

Creates a Rectangle that represents the intersection between this Rectangle and rect.
public Intersect ( Rectangle rect ) : void
rect Rectangle
return void

Intersect() public method

public Intersect ( System rect ) : void
rect System
return void

IntersectsWith() public method

public IntersectsWith ( System rect ) : bool
rect System
return bool

Offset() public method

Adjusts the location of this rectangle by the specified amount.

public Offset ( Point pos ) : void
pos Point
return void

Offset() public method

public Offset ( System pos ) : void
pos System
return void

Offset() public method

Adjusts the location of this rectangle by the specified amount.
public Offset ( int x, int y ) : void
x int
y int
return void

Rectangle() public method

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

Rectangle() public method

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

Rectangle() public method

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
return System.Diagnostics.Contracts

Rectangle() public method

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
return System.Diagnostics.Contracts

Round() public static method

Converts a RectangleF to a Rectangle by performing a round operation on all the coordinates.
public static Round ( RectangleF value ) : Rectangle
value RectangleF
return Rectangle

Round() public static method

public static Round ( System value ) : System.Drawing.Rectangle
value System
return System.Drawing.Rectangle

ToString() public method

Converts the attributes of this to a human readable string.

public ToString ( ) : string
return string

Truncate() public static method

Converts a RectangleF to a Rectangle by performing a truncate operation on all the coordinates.
public static Truncate ( RectangleF value ) : Rectangle
value RectangleF
return Rectangle

Truncate() public static method

public static Truncate ( System value ) : System.Drawing.Rectangle
value System
return System.Drawing.Rectangle

Union() public static method

public static Union ( System a, System b ) : System.Drawing.Rectangle
a System
b System
return System.Drawing.Rectangle

operator() public static method

Tests whether two objects have equal location and size.

public static operator ( ) : bool
return bool

Property Details

Empty public_oe static_oe property

public static Rectangle Empty
return Rectangle

Empty public_oe static_oe property

public static System.Drawing.Rectangle Empty
return System.Drawing.Rectangle