13#include <boost/operators.hpp>
24 :
public boost::addable<Point<T>>
25 ,
public boost::subtractable<Point<T>>
26 ,
public boost::multipliable2<Point<T>, T>
27 ,
public boost::dividable2<Point<T>, T>
52 explicit Point(
const GdkPoint& other)
102 template <
typename U>
105 return {
static_cast<U
>(
x),
static_cast<U
>(
y)};
108 [[nodiscard]] GdkPoint
toGdkPoint()
const {
return {
static_cast<int>(
x),
static_cast<int>(
y)}; }
115 template <
typename T>
121 template <
typename T>
127 template <
typename T>
130 return os <<
'(' <<
p.x <<
',' <<
p.y <<
')';
133 template <
typename T,
typename U>
136 using R = std::common_type_t<T, U>;
143 template <
typename T,
typename U>
146 using R = std::common_type_t<T, U>;
153 template <
typename T,
typename U>
156 using R = std::common_type_t<T, U>;
163 template <
typename T,
typename U>
166 using R = std::common_type_t<T, U>;
173 template <
typename T,
typename U>
179 template <
typename T,
typename U>
185 template <
typename T>
188 using ::rounded_divide_by;
192 template <
typename T>
195 using ::ceiled_divide_by;
199 template <
typename T>
202 using ::floored_divide_by;
206 template <
typename T>
209 using ::rounded_divide_by;
213 template <
typename T>
216 using ::ceiled_divide_by;
220 template <
typename T>
223 using ::floored_divide_by;
227 template <
typename T>
const uint8_t value
Definition blob-tests.cc:114
Point< value_type > & operator*=(value_type other)
Definition point.hh:70
Point< value_type > & operator+=(const Point< value_type > &other)
Definition point.hh:61
Point(Point< U > other)
Definition point.hh:46
Point(value_type x_, value_type y_)
Definition point.hh:39
Point< U > to() const
Definition point.hh:103
Point(const GdkPoint &other)
Definition point.hh:52
Point< value_type > operator-() const
Definition point.hh:98
GdkPoint toGdkPoint() const
Definition point.hh:108
Point< value_type > & operator/=(const Point< value_type > &other)
Definition point.hh:91
Point< value_type > & operator*=(const Point< value_type > &other)
Definition point.hh:77
Point< value_type > & operator/=(value_type other)
Definition point.hh:84
value_type y
Definition point.hh:112
Point< value_type > & operator-=(const Point< value_type > &other)
Definition point.hh:68
T value_type
Definition point.hh:30
double magnitude() const
Definition point.hh:100
bool operator==(const Point< value_type > &other) const
Definition point.hh:58
value_type x
Definition point.hh:111
bool operator!=(const Point< value_type > &other) const
Definition point.hh:59
Point(value_type xy)
Definition point.hh:34
PresentationInterfaceStub::Ptr const p
Definition determine-size-test.cc:172
Definition tweak-view.hh:22
Point< std::common_type_t< T, U > > operator-(Point< T > left, Point< U > right)
Definition point.hh:134
Point< T > ceil(Point< T > p)
Definition point.hh:228
Point< std::common_type_t< T, U > > operator/(Point< T > left, Point< U > right)
Definition point.hh:164
Point< T > floored_divide_by(Point< T > value, T factor)
Definition point.hh:200
std::ostream & operator<<(std::ostream &os, const Segment< T > &s)
Definition linearsegment.hh:235
Point< std::common_type_t< T, U > > operator+(Point< T > left, Point< U > right)
Definition point.hh:144
Point< T > rounded_divide_by(Point< T > value, T factor)
Definition point.hh:186
Point< T > make_point(T x, T y)
Definition point.hh:116
Point< std::common_type_t< T, U > > operator*(Point< T > left, Point< U > right)
Definition point.hh:154
Point< T > ceiled_divide_by(Point< T > value, T factor)
Definition point.hh:193
Segment< int > const right(3, 7)
SampleIterator< const uint8_t > result
Definition sampleiterator-tests.cc:94