C# Class Sparrow.Geom.Rectangle

Mostrar archivo Open project: fmotagarcia/sparrow-sharp Class Usage Examples

Public Properties

Property Type Description
Height float
Width float
X float
Y float

Public Methods

Method Description
Contains ( Point point ) : bool
Contains ( Rectangle rectangle ) : bool
Contains ( float x, float y ) : bool
Copy ( ) : Rectangle
CopyFromRectangle ( Rectangle rectangle ) : void
Empty ( ) : void
Inflate ( float dx, float dy ) : void
Intersection ( Rectangle rectangle ) : Rectangle

Returns the intersecting rectangle

Intersects ( Rectangle rectangle ) : bool
IsEmpty ( ) : bool
IsEqual ( Rectangle other ) : bool

Determines whether this instance is equal the specified other with a small Epsilon error margin.

Normalize ( ) : void

Inverts X or Y if they are negative

Rectangle ( float x = 0.0f, float y = 0.0f, float width = 0.0f, float height = 0.0f ) : System
Union ( Rectangle rectangle ) : Rectangle

Returns a rectangle that encompasses both rectangles

Method Details

Contains() public method

public Contains ( Point point ) : bool
point Point
return bool

Contains() public method

public Contains ( Rectangle rectangle ) : bool
rectangle Rectangle
return bool

Contains() public method

public Contains ( float x, float y ) : bool
x float
y float
return bool

Copy() public method

public Copy ( ) : Rectangle
return Rectangle

CopyFromRectangle() public method

public CopyFromRectangle ( Rectangle rectangle ) : void
rectangle Rectangle
return void

Empty() public method

public Empty ( ) : void
return void

Inflate() public method

public Inflate ( float dx, float dy ) : void
dx float
dy float
return void

Intersection() public method

Returns the intersecting rectangle
public Intersection ( Rectangle rectangle ) : Rectangle
rectangle Rectangle
return Rectangle

Intersects() public method

public Intersects ( Rectangle rectangle ) : bool
rectangle Rectangle
return bool

IsEmpty() public method

public IsEmpty ( ) : bool
return bool

IsEqual() public method

Determines whether this instance is equal the specified other with a small Epsilon error margin.
public IsEqual ( Rectangle other ) : bool
other Rectangle
return bool

Normalize() public method

Inverts X or Y if they are negative
public Normalize ( ) : void
return void

Rectangle() public method

public Rectangle ( float x = 0.0f, float y = 0.0f, float width = 0.0f, float height = 0.0f ) : System
x float
y float
width float
height float
return System

Union() public method

Returns a rectangle that encompasses both rectangles
public Union ( Rectangle rectangle ) : Rectangle
rectangle Rectangle
return Rectangle

Property Details

Height public_oe property

public float Height
return float

Width public_oe property

public float Width
return float

X public_oe property

public float X
return float

Y public_oe property

public float Y
return float