19#ifndef MIR_GEOMETRY_DIMENSIONS_H_
20#define MIR_GEOMETRY_DIMENSIONS_H_
45 template<
typename AnyInteger>
50 return (uint32_t)value;
161template<
typename Scalar>
163template<
typename Scalar>
165template<
typename Scalar>
167template<
typename Scalar>
169template<
typename Scalar>
171template<
typename Scalar>
173template<
typename Scalar>
175template<
typename Scalar>
179template<
typename Scalar>
181template<
typename Scalar>
183template<
typename Scalar>
185template<
typename Scalar>
202template<
typename Target,
typename Source>
203inline constexpr Target
dim_cast(Source s) {
return Target(s.as_int()); }
Definition: dimensions.h:37
constexpr IntWrapper(IntWrapper const &that)=default
constexpr IntWrapper()
Definition: dimensions.h:41
constexpr IntWrapper(AnyInteger value)
Definition: dimensions.h:46
IntWrapper & operator=(IntWrapper const &that)=default
constexpr uint32_t as_uint32_t() const
Definition: dimensions.h:48
int ValueType
Definition: dimensions.h:39
constexpr int as_int() const
Definition: dimensions.h:53
constexpr bool operator!=(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:76
constexpr bool operator>=(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:88
constexpr bool operator>(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:100
constexpr bool operator==(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:70
constexpr bool operator<(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:94
constexpr bool operator<=(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:82
std::ostream & operator<<(std::ostream &out, IntWrapper< Tag > const &value)
Definition: dimensions.h:63
detail::IntWrapper< struct DeltaXTag > DeltaX
Definition: dimensions.h:113
constexpr DeltaX as_delta(X const &x)
Definition: dimensions.h:193
detail::IntWrapper< struct HeightTag > Height
Definition: dimensions.h:107
detail::IntWrapper< struct WidthTag > Width
Definition: dimensions.h:106
detail::IntWrapper< struct StrideTag > Stride
Definition: dimensions.h:109
constexpr Height as_height(DeltaY const &dy)
Definition: dimensions.h:190
DeltaX & operator-=(DeltaX &lhs, DeltaX rhs)
Definition: dimensions.h:123
constexpr Width operator*(Scalar scale, Width const &w)
Definition: dimensions.h:162
constexpr Width operator/(Width const &w, Scalar scale)
Definition: dimensions.h:180
DeltaX & operator+=(DeltaX &lhs, DeltaX rhs)
Definition: dimensions.h:121
constexpr X as_x(DeltaX const &dx)
Definition: dimensions.h:191
constexpr DeltaX operator+(DeltaX lhs, DeltaX rhs)
Definition: dimensions.h:117
constexpr DeltaX operator-(DeltaX lhs, DeltaX rhs)
Definition: dimensions.h:119
constexpr Y as_y(DeltaY const &dy)
Definition: dimensions.h:192
constexpr Target dim_cast(Source s)
Definition: dimensions.h:203
detail::IntWrapper< struct YTag > Y
Definition: dimensions.h:112
constexpr Width as_width(DeltaX const &dx)
Definition: dimensions.h:189
detail::IntWrapper< struct DeltaYTag > DeltaY
Definition: dimensions.h:114
detail::IntWrapper< struct XTag > X
Definition: dimensions.h:111
Definition: splash_session.h:24