C# Class System.Drawing.Rectangle

Afficher le fichier Open project: dotnet/corefx Class Usage Examples

Méthodes publiques

Свойство Type Description
Empty Rectangle
Empty System.Drawing.Rectangle

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

Ceiling() public static méthode

public static Ceiling ( System value ) : System.Drawing.Rectangle
value System
Résultat System.Drawing.Rectangle

Contains() public méthode

public Contains ( System pt ) : bool
pt System
Résultat bool

Equals() public méthode

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

public Equals ( object obj ) : bool
obj object
Résultat bool

FromLTRB() public static méthode

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
Résultat Rectangle

FromLTRB() public static méthode

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

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

Inflate() public static méthode

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
Résultat Rectangle

Inflate() public static méthode

public static Inflate ( System rect, int x, int y ) : System.Drawing.Rectangle
rect System
x int
y int
Résultat System.Drawing.Rectangle

Inflate() public méthode

Inflates this by the specified amount.
public Inflate ( Size size ) : void
size Size
Résultat void

Inflate() public méthode

public Inflate ( System size ) : void
size System
Résultat void

Inflate() public méthode

Inflates this by the specified amount.

public Inflate ( int width, int height ) : void
width int
height int
Résultat void

Intersect() public static méthode

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
Résultat Rectangle

Intersect() public static méthode

public static Intersect ( System a, System b ) : System.Drawing.Rectangle
a System
b System
Résultat System.Drawing.Rectangle

Intersect() public méthode

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

Intersect() public méthode

public Intersect ( System rect ) : void
rect System
Résultat void

IntersectsWith() public méthode

public IntersectsWith ( System rect ) : bool
rect System
Résultat bool

Offset() public méthode

Adjusts the location of this rectangle by the specified amount.

public Offset ( Point pos ) : void
pos Point
Résultat void

Offset() public méthode

public Offset ( System pos ) : void
pos System
Résultat void

Offset() public méthode

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

Rectangle() public méthode

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

Rectangle() public méthode

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

Rectangle() public méthode

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
Résultat System.Diagnostics.Contracts

Rectangle() public méthode

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
Résultat System.Diagnostics.Contracts

Round() public static méthode

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

Round() public static méthode

public static Round ( System value ) : System.Drawing.Rectangle
value System
Résultat System.Drawing.Rectangle

ToString() public méthode

Converts the attributes of this to a human readable string.

public ToString ( ) : string
Résultat string

Truncate() public static méthode

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

Truncate() public static méthode

public static Truncate ( System value ) : System.Drawing.Rectangle
value System
Résultat System.Drawing.Rectangle

Union() public static méthode

public static Union ( System a, System b ) : System.Drawing.Rectangle
a System
b System
Résultat System.Drawing.Rectangle

operator() public static méthode

Tests whether two objects have equal location and size.

public static operator ( ) : bool
Résultat bool

Property Details

Empty public_oe static_oe property

public static Rectangle Empty
Résultat Rectangle

Empty public_oe static_oe property

public static System.Drawing.Rectangle Empty
Résultat System.Drawing.Rectangle