LuciadCPillar C# 2024.0.08
Luciad.Cartesian.Rectangle Struct Reference

A "POD" for a 2D rectangle. More...

Inheritance diagram for Luciad.Cartesian.Rectangle:

Public Member Functions

 Rectangle (Coordinate corner1, Coordinate corner2)
 Creates a Rectangle with the given corners. More...
 
 Rectangle (double x, double y, double width, double height)
 Creates a Rectangle with the provided x, y, width, and height values. More...
 
 Rectangle (Rectangle other)
 
override bool Equals (object other)
 
bool Equals (Rectangle other)
 
override int GetHashCode ()
 Returns the hash for this rectangle. More...
 
void Grow (double margin)
 Grows this rectangle by the given margin. More...
 
bool IsValid ()
 Returns whether all fields are neither not-a-number nor infinite and the width and height are non-negative. More...
 
override string ToString ()
 

Static Public Member Functions

static bool operator!= (Rectangle lhs, Rectangle rhs)
 
static bool operator== (Rectangle lhs, Rectangle rhs)
 

Properties

Coordinate Center [get]
 
double Height [get]
 The rectangle's height. More...
 
Coordinate LowerLeftCorner [get]
 
Coordinate LowerRightCorner [get]
 
Coordinate UpperLeftCorner [get]
 
Coordinate UpperRightCorner [get]
 
double Width [get]
 The rectangle's width. More...
 
double X [get]
 The lower left corner's x-ordinate. More...
 
double Y [get]
 The lower left corner's y-ordinate. More...
 

Detailed Description

A "POD" for a 2D rectangle.

Not a geometry, to be used for communicating 2D cartesian rectangles.

Constructor & Destructor Documentation

◆ Rectangle() [1/3]

Luciad.Cartesian.Rectangle.Rectangle ( double  x,
double  y,
double  width,
double  height 
)
inline

Creates a Rectangle with the provided x, y, width, and height values.

Parameters
xthe lower left corner's x-ordinate
ythe lower left corner's y-ordinate
widththe rectangle's width
heightthe rectangle's height

◆ Rectangle() [2/3]

Luciad.Cartesian.Rectangle.Rectangle ( Coordinate  corner1,
Coordinate  corner2 
)
inline

Creates a Rectangle with the given corners.

The corners do not need to have any particular relation to each other. Only the x and y ordinates of the corners are considered.

Parameters
corner1one corner position
corner2another corner position

◆ Rectangle() [3/3]

Luciad.Cartesian.Rectangle.Rectangle ( Rectangle  other)
inline

Member Function Documentation

◆ Equals() [1/2]

override bool Luciad.Cartesian.Rectangle.Equals ( object  other)
inline

◆ Equals() [2/2]

bool Luciad.Cartesian.Rectangle.Equals ( Rectangle  other)
inline

◆ GetHashCode()

override int Luciad.Cartesian.Rectangle.GetHashCode ( )
inline

Returns the hash for this rectangle.

Returns
the hash for this rectangle.

◆ Grow()

void Luciad.Cartesian.Rectangle.Grow ( double  margin)
inline

Grows this rectangle by the given margin.

The lower left corner is moved in the direction of negative x and y by margin. The upper right corner is moved in the direction of positive x and y by margin.

Parameters
margina margin

◆ IsValid()

bool Luciad.Cartesian.Rectangle.IsValid ( )
inline

Returns whether all fields are neither not-a-number nor infinite and the width and height are non-negative.

Returns
whether all fields are neither not-a-number nor infinite and the width and height are non-negative.

◆ operator!=()

static bool Luciad.Cartesian.Rectangle.operator!= ( Rectangle  lhs,
Rectangle  rhs 
)
inlinestatic

◆ operator==()

static bool Luciad.Cartesian.Rectangle.operator== ( Rectangle  lhs,
Rectangle  rhs 
)
inlinestatic

◆ ToString()

override string Luciad.Cartesian.Rectangle.ToString ( )
inline

Property Documentation

◆ Center

Coordinate Luciad.Cartesian.Rectangle.Center
get

◆ Height

double Luciad.Cartesian.Rectangle.Height
get

The rectangle's height.

[get]

The rectangle's height.

◆ LowerLeftCorner

Coordinate Luciad.Cartesian.Rectangle.LowerLeftCorner
get

◆ LowerRightCorner

Coordinate Luciad.Cartesian.Rectangle.LowerRightCorner
get

◆ UpperLeftCorner

Coordinate Luciad.Cartesian.Rectangle.UpperLeftCorner
get

◆ UpperRightCorner

Coordinate Luciad.Cartesian.Rectangle.UpperRightCorner
get

◆ Width

double Luciad.Cartesian.Rectangle.Width
get

The rectangle's width.

[get]

The rectangle's width.

◆ X

double Luciad.Cartesian.Rectangle.X
get

The lower left corner's x-ordinate.

[get]

The lower left corner's x-ordinate.

◆ Y

double Luciad.Cartesian.Rectangle.Y
get

The lower left corner's y-ordinate.

[get]

The lower left corner's y-ordinate.