HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends
hi::v1::corner_radii Class Reference

#include <hikogui/geometry/corner_radii.hpp>

Public Types

using array_type = f32x4
 

Public Member Functions

constexpr corner_radii (corner_radii const &) noexcept=default
 
constexpr corner_radii (corner_radii &&) noexcept=default
 
constexpr corner_radiioperator= (corner_radii const &) noexcept=default
 
constexpr corner_radiioperator= (corner_radii &&) noexcept=default
 
constexpr corner_radii (float radius) noexcept
 
constexpr corner_radii (float lb, float rb, float lt, float rt) noexcept
 
constexpr corner_radii (f32x4 v) noexcept
 Construct a corner_radii from a simd.
 
constexpr operator f32x4 () const noexcept
 
constexpr float left_bottom () const noexcept
 
constexpr float right_bottom () const noexcept
 
constexpr float left_top () const noexcept
 
constexpr float right_top () const noexcept
 
constexpr float operator[] (std::size_t i) const noexcept
 Get the corner radius by index.
 

Friends

template<int I>
constexpr friend float get (corner_radii const &rhs) noexcept
 Get the corner radius by index.
 
constexpr friend corner_radii operator+ (corner_radii const &lhs, float rhs) noexcept
 
constexpr friend corner_radii operator- (corner_radii const &lhs, float rhs) noexcept
 

Detailed Description

The 4 radii of the corners of a quad or rectangle.

Constructor & Destructor Documentation

◆ corner_radii()

constexpr hi::v1::corner_radii::corner_radii ( f32x4 v)
inlineexplicitconstexprnoexcept

Construct a corner_radii from a simd.

Parameters
vThe 4 radii, x=left-bottom, y=right-bottom, z=left-top, w=right-top.

Member Function Documentation

◆ operator[]()

constexpr float hi::v1::corner_radii::operator[] ( std::size_t i) const
inlineconstexprnoexcept

Get the corner radius by index.

Parameters
iThe index; 0=left-bottom, 1=right-bottom, 2=left-top, 3=right-top.
Returns
The corner radius.

Friends And Related Symbol Documentation

◆ get

template<int I>
constexpr friend float get ( corner_radii const & rhs)
friend

Get the corner radius by index.

Template Parameters
IThe index; 0=left-bottom, 1=right-bottom, 2=left-top, 3=right-top.
Returns
The corner radius.

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