IDS peak ICV v1.4.0
Loading...
Searching...
No Matches
RectangleT< TPosition, TSize > Class Template Reference

Public Member Functions

 RectangleT (PointT< TPosition > position, SizeT< TSize > size)
 Initializes a new instance of the RectangleT<TPosition,TSize> class with specified coordinates and dimensions.
 
 RectangleT (TPosition x, TPosition y, TSize width, TSize height)
 Initializes a new instance of the RectangleT<TPosition,TSize> class with specified coordinates and dimensions.
 
override bool Equals (object? obj)
 Determines whether the specified object is equal to the current RectangleT<TPosition,TSize>.
 
override int GetHashCode ()
 Returns a hash code for the current point.
 
override string ToString ()
 Returns a string representation of the rectangle.
 

Properties

TPosition X [get]
 Gets or sets the X coordinate of the top-left corner of the rectangle.
 
TPosition Y [get]
 Gets the Y coordinate of the top-left corner of the rectangle.
 
TSize Width [get]
 Gets the width of the rectangle.
 
TSize Height [get]
 Gets the height of the rectangle.
 
PointT< TPosition > Position [get]
 Gets the position of the rectangle.
 
SizeT< TSize > Size [get]
 Gets the size of the rectangle.
 

Detailed Description

Represents a rectangle with generic coordinates and dimensions.

Template Parameters
TPositionThe type of the position values (e.g., int, float).
TSizeThe type of the size values (e.g., int, float).
Since
IDSImaging.Peak.Common 1.3

Constructor & Destructor Documentation

◆ RectangleT() [1/2]

RectangleT ( PointT< TPosition > position,
SizeT< TSize > size )
inline

Initializes a new instance of the RectangleT<TPosition,TSize> class with specified coordinates and dimensions.

Parameters
positionThe X,Y coordinates of the top-left corner of the rectangle.
sizeThe Size of the rectangle.

◆ RectangleT() [2/2]

RectangleT ( TPosition x,
TPosition y,
TSize width,
TSize height )
inline

Initializes a new instance of the RectangleT<TPosition,TSize> class with specified coordinates and dimensions.

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

Member Function Documentation

◆ Equals()

override bool Equals ( object? obj)
inline

Determines whether the specified object is equal to the current RectangleT<TPosition,TSize>.

Parameters
objThe object to compare with the current rectangle.
Returns
true if the objects are equal; otherwise, false.

◆ GetHashCode()

override int GetHashCode ( )
inline

Returns a hash code for the current point.

◆ ToString()

override string ToString ( )
inline

Returns a string representation of the rectangle.

Returns
A string that represents the current rectangle.

Property Documentation

◆ Height

TSize Height
get

Gets the height of the rectangle.

◆ Position

PointT<TPosition> Position
get

Gets the position of the rectangle.

◆ Size

SizeT<TSize> Size
get

Gets the size of the rectangle.

◆ Width

TSize Width
get

Gets the width of the rectangle.

◆ X

TPosition X
get

Gets or sets the X coordinate of the top-left corner of the rectangle.

◆ Y

TPosition Y
get

Gets the Y coordinate of the top-left corner of the rectangle.