Go to the documentation of this file.
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>
161 template<
typename Scalar>
163 template<
typename Scalar>
165 template<
typename Scalar>
167 template<
typename Scalar>
169 template<
typename Scalar>
171 template<
typename Scalar>
173 template<
typename Scalar>
175 template<
typename Scalar>
192 template<
typename Target,
typename Source>
193 inline constexpr Target
dim_cast(Source s) {
return Target(s.as_int()); }
DeltaX & operator+=(DeltaX &lhs, DeltaX rhs)
Definition: dimensions.h:121
constexpr Target dim_cast(Source s)
Definition: dimensions.h:193
detail::IntWrapper< struct WidthTag > Width
Definition: dimensions.h:106
constexpr Width as_width(DeltaX const &dx)
Definition: dimensions.h:179
constexpr DeltaX operator-(DeltaX lhs, DeltaX rhs)
Definition: dimensions.h:119
Definition: dimensions.h:36
constexpr bool operator<(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:94
constexpr IntWrapper(AnyInteger value)
Definition: dimensions.h:46
DeltaX & operator-=(DeltaX &lhs, DeltaX rhs)
Definition: dimensions.h:123
constexpr IntWrapper()
Definition: dimensions.h:41
detail::IntWrapper< struct YTag > Y
Definition: dimensions.h:112
constexpr X as_x(DeltaX const &dx)
Definition: dimensions.h:181
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:70
detail::IntWrapper< struct DeltaXTag > DeltaX
Definition: dimensions.h:113
constexpr DeltaX as_delta(X const &x)
Definition: dimensions.h:183
detail::IntWrapper< struct StrideTag > Stride
Definition: dimensions.h:109
Definition: splash_session.h:24
constexpr Y as_y(DeltaY const &dy)
Definition: dimensions.h:182
constexpr bool operator>(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:100
detail::IntWrapper< struct XTag > X
Definition: dimensions.h:111
detail::IntWrapper< struct HeightTag > Height
Definition: dimensions.h:107
constexpr uint32_t as_uint32_t() const
Definition: dimensions.h:48
constexpr Width operator*(Scalar scale, Width const &w)
Definition: dimensions.h:162
std::ostream & operator<<(std::ostream &out, IntWrapper< Tag > const &value)
Definition: dimensions.h:63
constexpr Height as_height(DeltaY const &dy)
Definition: dimensions.h:180
detail::IntWrapper< struct DeltaYTag > DeltaY
Definition: dimensions.h:114
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:82
IntWrapper & operator=(IntWrapper const &that)=default
constexpr bool operator>=(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:88
constexpr int as_int() const
Definition: dimensions.h:53
int ValueType
Definition: dimensions.h:39
Copyright © 2012-2020
Canonical Ltd.
Generated on Tue Jul 28 09:29:59 UTC 2020
This documentation is licensed under the GPL version 2 or 3.