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>
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>
177 template<
typename Scalar>
181 template<
typename Scalar>
183 template<
typename Scalar>
185 template<
typename Scalar>
187 template<
typename Scalar>
204 template<
typename Target,
typename Source>
205 inline constexpr Target
dim_cast(Source s) {
return Target(s.as_int()); }
DeltaX & operator+=(DeltaX &lhs, DeltaX rhs)
Definition: dimensions.h:123
constexpr Target dim_cast(Source s)
Definition: dimensions.h:205
detail::IntWrapper< struct WidthTag > Width
Definition: dimensions.h:106
constexpr Width as_width(DeltaX const &dx)
Definition: dimensions.h:191
constexpr DeltaX operator-(DeltaX lhs, DeltaX rhs)
Definition: dimensions.h:119
Definition: dimensions.h:37
constexpr bool operator<(IntWrapper< Tag > const &lhs, IntWrapper< Tag > const &rhs)
Definition: dimensions.h:94
constexpr IntWrapper(AnyInteger value)
Definition: dimensions.h:46
constexpr IntWrapper(IntWrapper const &that)=default
DeltaX & operator-=(DeltaX &lhs, DeltaX rhs)
Definition: dimensions.h:125
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:193
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:195
detail::IntWrapper< struct StrideTag > Stride
Definition: dimensions.h:109
Definition: splash_session.h:24
constexpr Width operator/(Width const &w, Scalar scale)
Definition: dimensions.h:182
constexpr Y as_y(DeltaY const &dy)
Definition: dimensions.h:194
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:164
std::ostream & operator<<(std::ostream &out, IntWrapper< Tag > const &value)
Definition: dimensions.h:63
constexpr Height as_height(DeltaY const &dy)
Definition: dimensions.h:192
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 Thu Dec 17 06:53:45 UTC 2020
This documentation is licensed under the GPL version 2 or 3.