HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
v1::geo::scale< D > Class Template Reference

Public Member Functions

constexpr scale (scale const &) noexcept=default
constexpr scale (scale &&) noexcept=default
constexpr scale & operator= (scale const &) noexcept=default
constexpr scale & operator= (scale &&) noexcept=default
constexpr operator f32x4 () const noexcept
constexpr operator extent< float, 2 > () const noexcept
constexpr operator extent< float, 3 > () const noexcept
constexpr scale (f32x4 const &v) noexcept
template<int E>
constexpr scale (vector< float, E > const &v) noexcept
constexpr operator matrix< D > () const noexcept
constexpr scale (identity const &) noexcept
constexpr scale (float value) noexcept
constexpr scale (float value) noexcept
constexpr scale (float x, float y) noexcept
constexpr scale (float x, float y, float z=1.0) noexcept
template<int E>
constexpr vector< float, E > operator* (vector< float, E > const &rhs) const noexcept
template<int E>
constexpr extent< float, E > operator* (extent< float, E > const &rhs) const noexcept
template<int E>
constexpr point< float, E > operator* (point< float, E > const &rhs) const noexcept
constexpr aarectangle operator* (aarectangle const &rhs) const noexcept
 Scale a rectangle around it's center.
constexpr rectangle operator* (rectangle const &rhs) const noexcept
constexpr quad operator* (quad const &rhs) const noexcept
constexpr scale operator* (identity const &) const noexcept
template<int E>
constexpr auto operator* (scale< E > const &rhs) const noexcept
template<int E>
constexpr bool operator== (scale< E > const &rhs) const noexcept
constexpr bool holds_invariant () const noexcept

Static Public Member Functions

template<int E>
requires (E <= D)
static constexpr scale uniform (extent< float, E > src, extent< float, E > dst) noexcept
 Get a uniform-scale-transform to scale an extent to another extent.
template<different_from< float > O, int E>
requires (E <= D)
static constexpr scale uniform (extent< O, E > src, extent< O, E > dst) noexcept
 Get a uniform-scale-transform to scale an extent to another extent.

Friends

constexpr quad scale_from_center (quad const &lhs, scale const &rhs) noexcept
 scale the quad.

Member Function Documentation

◆ operator*()

template<int D>
aarectangle v1::geo::scale< D >::operator* ( aarectangle const & rhs) const
inlinenodiscardconstexprnoexcept

Scale a rectangle around it's center.

◆ uniform() [1/2]

template<int D>
template<int E>
requires (E <= D)
constexpr scale v1::geo::scale< D >::uniform ( extent< float, E > src,
extent< float, E > dst )
inlinestaticnodiscardconstexprnoexcept

Get a uniform-scale-transform to scale an extent to another extent.

Parameters
srcThe extent to transform
dstThe extent to scale to.
Returns
a scale to transform the src_extent to the dst_extent.

◆ uniform() [2/2]

template<int D>
template<different_from< float > O, int E>
requires (E <= D)
constexpr scale v1::geo::scale< D >::uniform ( extent< O, E > src,
extent< O, E > dst )
inlinestaticnodiscardconstexprnoexcept

Get a uniform-scale-transform to scale an extent to another extent.

Parameters
srcThe extent to transform
dstThe extent to scale to.
Returns
a scale to transform the src_extent to the dst_extent.

◆ scale_from_center

template<int D>
quad scale_from_center ( quad const & lhs,
scale< D > const & rhs )
friend

scale the quad.

Each edge of the quad scaled.

Parameters
lhsA quad.
rhsThe width and height to scale each edge with.
Returns
The new quad extended by the size.

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