C# Class PixelFarm.Drawing.RectangleF

Show file Open project: prepare/HTML-Renderer Class Usage Examples

Public Properties

Property Type Description
Empty RectangleF

Public Methods

Method Description
Contains ( PointF pt ) : bool

Contains Method

Checks if a Point lies within this RectangleF.

Contains ( RectangleF rect ) : bool

Contains Method

Checks if a RectangleF lies entirely within this RectangleF.

Contains ( float x, float y ) : bool

Contains Method

Checks if an x,y coordinate lies within this RectangleF.

Equals ( object obj ) : bool

Equals Method

Checks equivalence of this RectangleF and an object.

FromLTRB ( float left, float top, float right, float bottom ) : RectangleF

FromLTRB Shared Method

Produces a RectangleF structure from left, top, right, and bottom coordinates.

GetHashCode ( ) : int

GetHashCode Method

Calculates a hashing value.

Inflate ( RectangleF rect, float x, float y ) : RectangleF

Inflate Shared Method

Produces a new RectangleF by inflating an existing RectangleF by the specified coordinate values.

Inflate ( SizeF size ) : void

Inflate Method

Inflates the RectangleF by a specified Size.

Inflate ( float x, float y ) : void

Inflate Method

Inflates the RectangleF by a specified width and height.

Intersect ( RectangleF a, RectangleF b ) : RectangleF

Intersect Shared Method

Produces a new RectangleF by intersecting 2 existing RectangleFs. Returns null if there is no intersection.

Intersect ( RectangleF rect ) : void

Intersect Method

Replaces the RectangleF with the intersection of itself and another RectangleF.

IntersectsWith ( RectangleF rect ) : bool

IntersectsWith Method

Checks if a RectangleF intersects with this one.

Offset ( PointF pos ) : void

Offset Method

Moves the RectangleF a specified distance.

Offset ( float x, float y ) : void

Offset Method

Moves the RectangleF a specified distance.

RectangleF ( PointF location, SizeF size ) : System

RectangleF Constructor

Creates a RectangleF from PointF and SizeF values.

RectangleF ( float x, float y, float width, float height ) : System

RectangleF Constructor

Creates a RectangleF from a specified x,y location and width and height values.

ToString ( ) : string

ToString Method

Formats the RectangleF in (x,y,w,h) notation.

Union ( RectangleF a, RectangleF b ) : RectangleF

Union Shared Method

Produces a new RectangleF from the union of 2 existing RectangleFs.

operator ( ) : bool

Equality Operator

Compares two RectangleF objects. The return value is based on the equivalence of the Location and Size properties of the two RectangleFs.

Private Methods

Method Description
IntersectsWithInclusive ( RectangleF r ) : bool

Method Details

Contains() public method

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

Contains() public method

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

Contains() public method

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

Equals() public method

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

FromLTRB() public static method

FromLTRB Shared Method
Produces a RectangleF structure from left, top, right, and bottom coordinates.
public static FromLTRB ( float left, float top, float right, float bottom ) : RectangleF
left float
top float
right float
bottom float
return RectangleF

GetHashCode() public method

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

Inflate() public static method

Inflate Shared Method
Produces a new RectangleF by inflating an existing RectangleF by the specified coordinate values.
public static Inflate ( RectangleF rect, float x, float y ) : RectangleF
rect RectangleF
x float
y float
return RectangleF

Inflate() public method

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

Inflate() public method

Inflate Method
Inflates the RectangleF by a specified width and height.
public Inflate ( float x, float y ) : void
x float
y float
return void

Intersect() public static method

Intersect Shared Method
Produces a new RectangleF by intersecting 2 existing RectangleFs. Returns null if there is no intersection.
public static Intersect ( RectangleF a, RectangleF b ) : RectangleF
a RectangleF
b RectangleF
return RectangleF

Intersect() public method

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

IntersectsWith() public method

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

Offset() public method

Offset Method
Moves the RectangleF a specified distance.
public Offset ( PointF pos ) : void
pos PointF
return void

Offset() public method

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

RectangleF() public method

RectangleF Constructor
Creates a RectangleF from PointF and SizeF values.
public RectangleF ( PointF location, SizeF size ) : System
location PointF
size SizeF
return System

RectangleF() public method

RectangleF Constructor
Creates a RectangleF from a specified x,y location and width and height values.
public RectangleF ( float x, float y, float width, float height ) : System
x float
y float
width float
height float
return System

ToString() public method

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

Union() public static method

Union Shared Method
Produces a new RectangleF from the union of 2 existing RectangleFs.
public static Union ( RectangleF a, RectangleF b ) : RectangleF
a RectangleF
b RectangleF
return RectangleF

operator() public static method

Equality Operator
Compares two RectangleF objects. The return value is based on the equivalence of the Location and Size properties of the two RectangleFs.
public static operator ( ) : bool
return bool

Property Details

Empty public static property

Empty Shared Field
An uninitialized RectangleF Structure.
public static RectangleF,PixelFarm.Drawing Empty
return RectangleF