GraceFt v2.3
开源图形引擎 EGE(Easy Graphics Engine) 的高层封装库
 
载入中...
搜索中...
未找到
GFt::RoundRect< T > 模板类 参考

圆角矩形类 更多...

#include <RoundRect.hpp>

Public 成员函数

constexpr RoundRect (const Rect< T > &rect, T rad)
 构造函数
 
template<typename U >
requires std::is_arithmetic_v<U>
constexpr operator RoundRect< U > () const
 类型转换函数
 
constexpr bool operator!= (const RoundRect< T > &other) const
 判断两个圆角矩形是否不同
 
constexpr bool operator== (const RoundRect< T > &other) const
 判断两个圆角矩形是否相同
 
constexpr TradiusBottomLeft ()
 圆角矩形左下角圆角半径
 
constexpr const TradiusBottomLeft () const
 圆角矩形左下角圆角半径 (const)
 
constexpr TradiusBottomRight ()
 圆角矩形右下角圆角半径
 
constexpr const TradiusBottomRight () const
 圆角矩形右下角圆角半径 (const)
 
constexpr TradiusTopLeft ()
 圆角矩形左上角圆角半径
 
constexpr const TradiusTopLeft () const
 圆角矩形左上角圆角半径 (const)
 
constexpr TradiusTopRight ()
 圆角矩形右上角圆角半径
 
constexpr const TradiusTopRight () const
 圆角矩形右上角圆角半径 (const)
 
constexpr const Rect< T > & rect () const
 圆角矩形所在矩形
 

友元

std::ostream & operator<< (std::ostream &os, const RoundRect< T > &r)
 输出圆角矩形信息到输出流
 

详细描述

template<typename T>
requires std::is_arithmetic_v<T>
class GFt::RoundRect< T >

圆角矩形类

模板参数
T数值类型

构造及析构函数说明

◆ RoundRect()

template<typename T >
GFt::RoundRect< T >::RoundRect ( const Rect< T > & rect,
T rad )
inlineconstexpr

构造函数

参数
rect矩形
rad圆角半径

成员函数说明

◆ operator RoundRect< U >()

template<typename T >
template<typename U >
requires std::is_arithmetic_v<U>
GFt::RoundRect< T >::operator RoundRect< U > ( ) const
inlineconstexpr

类型转换函数

模板参数
U目标类型
返回
转换后的圆角矩形

◆ operator!=()

template<typename T >
bool GFt::RoundRect< T >::operator!= ( const RoundRect< T > & other) const
inlineconstexpr

判断两个圆角矩形是否不同

参数
other另一个圆角矩形
返回
不同返回true,否则返回false

◆ operator==()

template<typename T >
bool GFt::RoundRect< T >::operator== ( const RoundRect< T > & other) const
inlineconstexpr

判断两个圆角矩形是否相同

参数
other另一个圆角矩形
返回
相同返回true,否则返回false

◆ radiusBottomLeft() [1/2]

template<typename T >
T & GFt::RoundRect< T >::radiusBottomLeft ( )
inlineconstexpr

圆角矩形左下角圆角半径

返回
半径

◆ radiusBottomLeft() [2/2]

template<typename T >
const T & GFt::RoundRect< T >::radiusBottomLeft ( ) const
inlineconstexpr

圆角矩形左下角圆角半径 (const)

返回
半径 (const)

◆ radiusBottomRight() [1/2]

template<typename T >
T & GFt::RoundRect< T >::radiusBottomRight ( )
inlineconstexpr

圆角矩形右下角圆角半径

返回
半径

◆ radiusBottomRight() [2/2]

template<typename T >
const T & GFt::RoundRect< T >::radiusBottomRight ( ) const
inlineconstexpr

圆角矩形右下角圆角半径 (const)

返回
半径 (const)

◆ radiusTopLeft() [1/2]

template<typename T >
T & GFt::RoundRect< T >::radiusTopLeft ( )
inlineconstexpr

圆角矩形左上角圆角半径

返回
半径

◆ radiusTopLeft() [2/2]

template<typename T >
const T & GFt::RoundRect< T >::radiusTopLeft ( ) const
inlineconstexpr

圆角矩形左上角圆角半径 (const)

返回
半径 (const)

◆ radiusTopRight() [1/2]

template<typename T >
T & GFt::RoundRect< T >::radiusTopRight ( )
inlineconstexpr

圆角矩形右上角圆角半径

返回
半径

◆ radiusTopRight() [2/2]

template<typename T >
const T & GFt::RoundRect< T >::radiusTopRight ( ) const
inlineconstexpr

圆角矩形右上角圆角半径 (const)

返回
半径 (const)

◆ rect()

template<typename T >
const Rect< T > & GFt::RoundRect< T >::rect ( ) const
inlineconstexpr

圆角矩形所在矩形

返回
矩形

友元及相关符号说明

◆ operator<<

template<typename T >
std::ostream & operator<< ( std::ostream & os,
const RoundRect< T > & r )
friend

输出圆角矩形信息到输出流

参数
os输出流
r圆角矩形
返回
输出流 os