C# Class SIL.Utils.Rect

Redefine Rect structure.
We can't simply use Rectangle, because the struct layout is different (Rect uses left, top, right, bottom, whereas Rectangle uses x, y, width, height).
Show file Open project: sillsdev/FieldWorks Class Usage Examples

Public Properties

Property Type Description
bottom int
left int
right int
top int

Public Methods

Method Description
Contains ( System pt ) : bool

Test whether the rectangle contains the specified point.

Rect ( int l, int t, int r, int b ) : System

Creates a rectangle with the specified coordinates

ToString ( ) : string

Method Details

Contains() public method

Test whether the rectangle contains the specified point.
public Contains ( System pt ) : bool
pt System
return bool

Rect() public method

Creates a rectangle with the specified coordinates
public Rect ( int l, int t, int r, int b ) : System
l int left
t int top
r int right
b int bottom
return System

ToString() public method

public ToString ( ) : string
return string

Property Details

bottom public property

Specifies the y-coordiante of the lower-right corner of the rectangle
public int bottom
return int

left public property

Specifies the x-coordiante of the upper-left corner of the rectangle
public int left
return int

right public property

Specifies the x-coordiante of the lower-right corner of the rectangle
public int right
return int

top public property

Specifies the y-coordiante of the upper-left corner of the rectangle
public int top
return int