C# Class OpenTK.Graphics.Rectangle

Mostrar archivo Open project: prepare/HTML-Renderer Class Usage Examples

Public Properties

Property Type Description
Empty Rectangle

Public Methods

Method 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

Method Description
IntersectsWithInclusive ( Rectangle r ) : bool

Method Details

Contains() public method

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

Contains() public method

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

Contains() public method

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

Equals() public method

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

FromLTRB() public static method

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

GetHashCode() public method

GetHashCode Method
Calculates a hashing value.
public GetHashCode ( ) : int
return int

Inflate() public static method

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

Inflate() public method

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

Inflate() public method

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

Intersect() public static method

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

Intersect() public method

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

IntersectsWith() public method

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

Offset() public method

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

Offset() public method

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

Rectangle() public method

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

Rectangle() public method

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

ToString() public method

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

Union() public static method

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

operator() public static method

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

Property Details

Empty public_oe static_oe property

Empty Shared Field
An uninitialized Rectangle Structure.
public static Rectangle,OpenTK.Graphics Empty
return Rectangle