Terminal++ 3.1.0.4
A C++ library for interacting with ANSI terminal windows
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
terminalpp::rectangle Struct Reference

A class that represents a rectangle in space. More...

#include <rectangle.hpp>

Public Member Functions

constexpr rectangle () noexcept=default
 Default Constructor.
 
constexpr rectangle (terminalpp::point origin, terminalpp::extent size) noexcept
 Constructor.
 

Public Attributes

terminalpp::point origin_
 The origin (top-left point) of the rectangle.
 
terminalpp::extent size_
 The size (amount the rectangle extends right and down) of the rectangle.
 

Friends

constexpr friend auto operator<=> (rectangle const &lhs, rectangle const &rhs) noexcept=default
 Relational operators for rectangles.
 

Detailed Description

A class that represents a rectangle in space.

Constructor & Destructor Documentation

◆ rectangle() [1/2]

constexpr terminalpp::rectangle::rectangle ( )
constexprdefaultnoexcept

Default Constructor.

Constructs the rectangle, leaving the origin and size uninitialized.

◆ rectangle() [2/2]

constexpr terminalpp::rectangle::rectangle ( terminalpp::point  origin,
terminalpp::extent  size 
)
inlineconstexprnoexcept

Constructor.

Constructs the rectangle, using the specified origin and size.

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