IDS peak ICV v1.3.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

Definition at line 17 of file Rectangle.cs.

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.

Definition at line 25 of file Rectangle.cs.

◆ 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.

Definition at line 39 of file Rectangle.cs.

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.

Definition at line 80 of file Rectangle.cs.

◆ GetHashCode()

override int GetHashCode ( )
inline

Returns a hash code for the current point.

Definition at line 113 of file Rectangle.cs.

◆ ToString()

override string ToString ( )
inline

Returns a string representation of the rectangle.

Returns
A string that represents the current rectangle.

Definition at line 122 of file Rectangle.cs.

Property Documentation

◆ Height

TSize Height
get

Gets the height of the rectangle.

Definition at line 63 of file Rectangle.cs.

◆ Position

PointT<TPosition> Position
get

Gets the position of the rectangle.

Definition at line 68 of file Rectangle.cs.

◆ Size

SizeT<TSize> Size
get

Gets the size of the rectangle.

Definition at line 73 of file Rectangle.cs.

◆ Width

TSize Width
get

Gets the width of the rectangle.

Definition at line 58 of file Rectangle.cs.

◆ X

TPosition X
get

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

Definition at line 48 of file Rectangle.cs.

◆ Y

TPosition Y
get

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

Definition at line 53 of file Rectangle.cs.