19 #ifndef MIR_GEOMETRY_DIMENSIONS_H_ 20 #define MIR_GEOMETRY_DIMENSIONS_H_ 35 template<
typename Tag>
45 template<
typename AnyInteger>
50 return (uint32_t)value;
62 template<
typename Tag>
69 template<
typename Tag>
75 template<
typename Tag>
81 template<
typename Tag>
87 template<
typename Tag>
93 template<
typename Tag>
99 template<
typename Tag>
147 template<
typename Scalar>
149 template<
typename Scalar>
151 template<
typename Scalar>
153 template<
typename Scalar>
155 template<
typename Scalar>
157 template<
typename Scalar>
159 template<
typename Scalar>
161 template<
typename Scalar>
164 template<
typename Target,
typename Source>
165 inline constexpr Target
dim_cast(Source s) {
return Target(s.as_int()); }
constexpr bool operator<(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:94
Definition: splash_session.h:24
int ValueType
Definition: dimensions.h:39
detail::IntWrapper< struct DeltaXTag > DeltaX
Definition: dimensions.h:113
detail::IntWrapper< struct YTag > Y
Definition: dimensions.h:112
detail::IntWrapper< struct WidthTag > Width
Definition: dimensions.h:106
constexpr DeltaX operator-(DeltaX lhs, DeltaX rhs)
Definition: dimensions.h:119
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:76
constexpr Target dim_cast(Source s)
Definition: dimensions.h:165
constexpr int as_int() const
Definition: dimensions.h:53
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:88
constexpr DeltaX operator+(DeltaX lhs, DeltaX rhs)
Definition: dimensions.h:117
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
constexpr IntWrapper(AnyInteger value)
Definition: dimensions.h:46
constexpr IntWrapper()
Definition: dimensions.h:41
X & operator-=(X &lhs, DeltaX rhs)
Definition: dimensions.h:129
detail::IntWrapper< struct StrideTag > Stride
Definition: dimensions.h:109
X & operator+=(X &lhs, DeltaX rhs)
Definition: dimensions.h:127
IntWrapper & operator=(IntWrapper const &that)=default
constexpr uint32_t as_uint32_t() const
Definition: dimensions.h:48
detail::IntWrapper< struct XTag > X
Definition: dimensions.h:111
constexpr Width operator *(Scalar scale, Width const &w)
Definition: dimensions.h:148
Definition: dimensions.h:36
detail::IntWrapper< struct HeightTag > Height
Definition: dimensions.h:107
detail::IntWrapper< struct DeltaYTag > DeltaY
Definition: dimensions.h:114