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

Public Types

using array_type = simd<float, 4>
 
using value_type = array_type::value_type
 

Public Member Functions

constexpr translate2 (translate2 const &) noexcept=default
 
constexpr translate2 (translate2 &&) noexcept=default
 
constexpr translate2operator= (translate2 const &) noexcept=default
 
constexpr translate2operator= (translate2 &&) noexcept=default
 
constexpr operator array_type () const noexcept
 
constexpr translate2 (array_type const &other) noexcept
 
constexpr translate2 (aarectangle const &other) noexcept
 
constexpr translate2 (aarectangle const &other, float z) noexcept
 
constexpr translate2 (vector2 const &other) noexcept
 
constexpr translate2 (point2 const &other) noexcept
 
constexpr translate2 (float x, float y) noexcept
 
constexpr float x () const noexcept
 
constexpr float y () const noexcept
 
constexpr float & x () noexcept
 
constexpr float & y () noexcept
 
constexpr translate2 operator~ () const noexcept
 
constexpr bool holds_invariant () const noexcept
 

Static Public Member Functions

static constexpr translate2 align (aarectangle src_rectangle, aarectangle dst_rectangle, alignment alignment) noexcept
 Align a rectangle within another rectangle.
 

Friends

constexpr friend bool operator== (translate2 const &lhs, translate2 const &rhs) noexcept
 
constexpr translate2 round (translate2 const &rhs) noexcept
 

Member Function Documentation

◆ align()

static constexpr translate2 hi::v1::translate2::align ( aarectangle src_rectangle,
aarectangle dst_rectangle,
alignment alignment )
inlinestaticconstexprnoexcept

Align a rectangle within another rectangle.

Parameters
src_rectangleThe rectangle to translate into the dst_rectangle
dst_rectangleThe destination rectangle.
alignmentHow the source rectangle should be aligned inside the destination rectangle.
Returns
Translation to move the src_rectangle into the dst_rectangle.

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