VectSharp  2.2.1
A light library for C# vector graphics
VectSharp.Rectangle Struct Reference

Represents a rectangle. More...

Public Member Functions

 Rectangle (Point location, Size size)
 Create a new Rectangle given its top-left corner and its size. More...
 
 Rectangle (double x, double y, double width, double height)
 Create a new Rectangle given its top-left corner and its size. More...
 
 Rectangle (Point topLeft, Point bottomRight)
 Create a new Rectangle given its top-left corner and its bottom-right corner. More...
 

Static Public Member Functions

static Rectangle Union (Rectangle rectangle1, Rectangle rectangle2)
 Computes the rectangular bounds of the union of two Rectangles. More...
 
static Rectangle Union (IEnumerable< Rectangle > rectangles)
 Computes the rectangular bounds of the union of multiple Rectangles. More...
 
static Rectangle Union (params Rectangle[] rectangles)
 Computes the rectangular bounds of the union of multiple Rectangles. More...
 

Public Attributes

Point Location
 The top-left corner of the rectangle. More...
 
Size Size
 The size of the rectangle. More...
 

Static Public Attributes

static readonly Rectangle NaN = new Rectangle(double.NaN, double.NaN, double.NaN, double.NaN)
 A rectangle whose dimensions are all double.NaN. More...
 

Detailed Description

Represents a rectangle.

Definition at line 172 of file Point.cs.

Constructor & Destructor Documentation

◆ Rectangle() [1/3]

VectSharp.Rectangle.Rectangle ( Point  location,
Size  size 
)

Create a new Rectangle given its top-left corner and its size.

Parameters
locationThe top-left corner of the rectangle.
sizeThe size of the rectangle.

Definition at line 194 of file Point.cs.

◆ Rectangle() [2/3]

VectSharp.Rectangle.Rectangle ( double  x,
double  y,
double  width,
double  height 
)

Create a new Rectangle given its top-left corner and its size.

Parameters
xThe horizontal coordinate of the top-left corner of the rectangle.
yThe vertical coordinate of the top-left corner of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.

Definition at line 207 of file Point.cs.

◆ Rectangle() [3/3]

VectSharp.Rectangle.Rectangle ( Point  topLeft,
Point  bottomRight 
)

Create a new Rectangle given its top-left corner and its bottom-right corner.

Parameters
topLeftThe top-left corner of the rectangle.
bottomRightThe bottom-right corner of the rectangle.

Definition at line 218 of file Point.cs.

Member Function Documentation

◆ Union() [1/3]

static Rectangle VectSharp.Rectangle.Union ( IEnumerable< Rectangle rectangles)
static

Computes the rectangular bounds of the union of multiple Rectangles.

Parameters
rectanglesThe Rectangles whose union will be computed.
Returns
The smallest Rectangle containing all the rectangles .

Definition at line 262 of file Point.cs.

◆ Union() [2/3]

static Rectangle VectSharp.Rectangle.Union ( params Rectangle[]  rectangles)
static

Computes the rectangular bounds of the union of multiple Rectangles.

Parameters
rectanglesThe Rectangles whose union will be computed.
Returns
The smallest Rectangle containing all the rectangles .

Definition at line 295 of file Point.cs.

◆ Union() [3/3]

static Rectangle VectSharp.Rectangle.Union ( Rectangle  rectangle1,
Rectangle  rectangle2 
)
static

Computes the rectangular bounds of the union of two Rectangles.

Parameters
rectangle1The first Rectangle.
rectangle2The second Rectangle.
Returns
The smallest Rectangle containing both rectangle1 and rectangle2 .

Definition at line 230 of file Point.cs.

Member Data Documentation

◆ Location

Point VectSharp.Rectangle.Location

The top-left corner of the rectangle.

Definition at line 182 of file Point.cs.

◆ NaN

readonly Rectangle VectSharp.Rectangle.NaN = new Rectangle(double.NaN, double.NaN, double.NaN, double.NaN)
static

A rectangle whose dimensions are all double.NaN.

Definition at line 177 of file Point.cs.

◆ Size

Size VectSharp.Rectangle.Size

The size of the rectangle.

Definition at line 187 of file Point.cs.


The documentation for this struct was generated from the following file: