C# Class OpenTK.Graphics.Rectangle

Afficher le fichier Open project: prepare/HTML-Renderer Class Usage Examples

Méthodes publiques

Свойство Type Description
Empty Rectangle

Méthodes publiques

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

Private Methods

Méthode Description
IntersectsWithInclusive ( Rectangle r ) : bool

Method Details

Contains() public méthode

Contains Method
Checks if a Point lies within this Rectangle.
public Contains ( Point pt ) : bool
pt Point
Résultat bool

Contains() public méthode

Contains Method
Checks if a Rectangle lies entirely within this Rectangle.
public Contains ( Rectangle rect ) : bool
rect Rectangle
Résultat bool

Contains() public méthode

Contains Method
Checks if an x,y coordinate lies within this Rectangle.
public Contains ( int x, int y ) : bool
x int
y int
Résultat bool

Equals() public méthode

Equals Method
Checks equivalence of this Rectangle and another object.
public Equals ( object obj ) : bool
obj object
Résultat bool

FromLTRB() public static méthode

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

GetHashCode() public méthode

GetHashCode Method
Calculates a hashing value.
public GetHashCode ( ) : int
Résultat int

Inflate() public static méthode

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

Inflate() public méthode

Inflate Method
Inflates the Rectangle by a specified Size.
public Inflate ( Size size ) : void
size Size
Résultat void

Inflate() public méthode

Inflate Method
Inflates the Rectangle by a specified width and height.
public Inflate ( int width, int height ) : void
width int
height int
Résultat void

Intersect() public static méthode

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

Intersect() public méthode

Intersect Method
Replaces the Rectangle with the intersection of itself and another Rectangle.
public Intersect ( Rectangle rect ) : void
rect Rectangle
Résultat void

IntersectsWith() public méthode

IntersectsWith Method
Checks if a Rectangle intersects with this one.
public IntersectsWith ( Rectangle rect ) : bool
rect Rectangle
Résultat bool

Offset() public méthode

Offset Method
Moves the Rectangle a specified distance.
public Offset ( Point pos ) : void
pos Point
Résultat void

Offset() public méthode

Offset Method
Moves the Rectangle a specified distance.
public Offset ( int x, int y ) : void
x int
y int
Résultat void

Rectangle() public méthode

Rectangle Constructor
Creates a Rectangle from Point and Size values.
public Rectangle ( Point location, Size size ) : System
location Point
size Size
Résultat System

Rectangle() public méthode

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

ToString() public méthode

ToString Method
Formats the Rectangle as a string in (x,y,w,h) notation.
public ToString ( ) : string
Résultat string

Union() public static méthode

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

operator() public static méthode

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

Property Details

Empty public_oe static_oe property

Empty Shared Field
An uninitialized Rectangle Structure.
public static Rectangle,OpenTK.Graphics Empty
Résultat Rectangle