12#include <boost/operators.hpp>
23 :
public boost::addable2<Rectangle<T>, Point<T>>
24 ,
public boost::subtractable2<Rectangle<T>, Point<T>>
25 ,
public boost::multipliable2<Rectangle<T>, T>
26 ,
public boost::multipliable2<Rectangle<T>, Point<T>>
27 ,
public boost::dividable2<Rectangle<T>, T>
28 ,
public boost::dividable2<Rectangle<T>, Point<T>>
55 template <
bool T_is_
int = std::is_same_v<
int, std::remove_cv_t<T>>>
100 template <
typename U>
103 using R = std::common_type_t<T, U>;
269 template <
typename U>
283 template <
typename T>
289 template <
typename T>
295 template <
typename T>
301 template <
typename T>
309 inline std::ostream&
operator<<(std::ostream& os,
const cairo_rectangle_int_t&
r) {
return os << Rectangle<double>(
r); }
311 template <
typename T,
typename U>
315 result *=
static_cast<std::common_type_t<T, U>
>(
right);
319 template <
typename T,
typename U>
329 template <
typename T,
typename U>
332 using R = std::common_type_t<T, U>;
352 template <
typename T>
value_type y
Definition point.hh:112
value_type x
Definition point.hh:111
Definition rectangle.hh:29
xy_type getBottomRight() const
Definition rectangle.hh:139
value_type height() const
Definition rectangle.hh:131
Rectangle(value_type x_, value_type y_, value_type width_, value_type height_)
Definition rectangle.hh:36
Rectangle< value_type > leftOf(value_type v) const
Definition rectangle.hh:143
Rectangle(const cairo_rectangle_int_t &rect)
Definition rectangle.hh:48
const Segment< value_type > & getVertically() const
Definition rectangle.hh:259
bool contains(xy_type const &other) const
Definition rectangle.hh:74
value_type getTop() const
Definition rectangle.hh:108
Point< T > xy_type
Definition rectangle.hh:32
bool contains(const Rectangle &other) const
Definition rectangle.hh:79
void setSize(xy_type const &s)
Definition rectangle.hh:261
cairo_rectangle_int_t toGdkRectangle() const
Definition rectangle.hh:62
Rectangle< value_type > above(Rectangle< value_type > const &r) const
Definition rectangle.hh:183
Segment< value_type > vertically
Definition rectangle.hh:280
value_type getWidth() const
Definition rectangle.hh:121
Rectangle< value_type > leftOf(Rectangle< value_type > const &r) const
Definition rectangle.hh:163
Rectangle< value_type > & operator/=(value_type other)
Definition rectangle.hh:243
Rectangle< value_type > below(value_type v) const
Definition rectangle.hh:158
value_type y() const
Definition rectangle.hh:127
xy_type getTopRight() const
Definition rectangle.hh:135
void setLeft(value_type v)
Definition rectangle.hh:117
Rectangle< value_type > & operator-=(xy_type const &other)
Definition rectangle.hh:227
Segment< value_type > horizontally
Definition rectangle.hh:279
Rectangle(std::enable_if_t<!T_is_int, Rectangle< int > const & > rect)
Definition rectangle.hh:56
Rectangle(const Segment< value_type > &horizontally_, const Segment< value_type > &vertically_)
Definition rectangle.hh:42
bool isEmpty() const
Definition rectangle.hh:141
bool operator==(const Rectangle &other) const
Definition rectangle.hh:203
Rectangle< value_type > & operator*=(xy_type const &other)
Definition rectangle.hh:236
xy_type getBottomLeft() const
Definition rectangle.hh:137
Rectangle< std::common_type_t< T, U > > intersection(const Rectangle< U > &other) const
Definition rectangle.hh:101
value_type x() const
Definition rectangle.hh:125
Rectangle< value_type > below(Rectangle< value_type > const &r) const
Definition rectangle.hh:193
Rectangle< value_type > above(value_type v) const
Definition rectangle.hh:153
const Segment< value_type > & getHorizontally() const
Definition rectangle.hh:257
void setRight(value_type v)
Definition rectangle.hh:119
Rectangle< U > to() const
Definition rectangle.hh:270
xy_type getSize() const
Definition rectangle.hh:267
bool intersects(const Rectangle &other) const
Definition rectangle.hh:84
void setBottom(value_type v)
Definition rectangle.hh:118
xy_type getTopLeft() const
Definition rectangle.hh:133
Rectangle< value_type > & operator/=(xy_type const &other)
Definition rectangle.hh:250
Rectangle intersection(const Rectangle &other) const
Definition rectangle.hh:95
value_type width() const
Definition rectangle.hh:129
value_type getRight() const
Definition rectangle.hh:114
value_type getHeight() const
Definition rectangle.hh:123
Rectangle< value_type > & operator+=(xy_type const &other)
Definition rectangle.hh:220
Rectangle< value_type > rightOf(value_type v) const
Definition rectangle.hh:148
value_type getLeft() const
Definition rectangle.hh:110
bool operator!=(const Rectangle &other) const
Definition rectangle.hh:218
Rectangle< value_type > rightOf(Rectangle< value_type > const &r) const
Definition rectangle.hh:173
void setTop(value_type v)
Definition rectangle.hh:116
T value_type
Definition rectangle.hh:31
Rectangle moveTo(xy_type const &other) const
Definition rectangle.hh:67
void reduceSizeToMultipleOf(value_type size)
Definition rectangle.hh:89
value_type getBottom() const
Definition rectangle.hh:112
Rectangle< value_type > & operator*=(value_type other)
Definition rectangle.hh:229
Rectangle moveTo(value_type const &x, value_type const &y) const
Definition rectangle.hh:69
Definition linearsegment.hh:50
void setSize(value_type n)
Definition linearsegment.hh:191
Segment< value_type > before(value_type v) const
Definition linearsegment.hh:107
bool isEmpty() const
Definition linearsegment.hh:139
void setStart(value_type n)
Definition linearsegment.hh:185
value_type getEnd() const
Definition linearsegment.hh:135
bool contains(value_type p) const
Definition linearsegment.hh:77
bool intersects(const Segment< value_type > &other) const
Definition linearsegment.hh:84
value_type getStart() const
Definition linearsegment.hh:133
void setEnd(value_type n)
Definition linearsegment.hh:192
Segment< value_type > after(value_type v) const
Definition linearsegment.hh:120
value_type getSize() const
Definition linearsegment.hh:137
Segment< value_type > intersection(const Segment< value_type > &other) const
Definition linearsegment.hh:91
Segment moveTo(value_type p) const
Definition linearsegment.hh:75
void reduceSizeToMultipleOf(value_type m)
Definition linearsegment.hh:89
PresentationInterfaceStub::Ptr const p
Definition determine-size-test.cc:172
cairo_rectangle_int_t createCairoIntRectangle(int x, int y, int width, int height)
Definition gtk-helpers.hh:71
Definition tweak-view.hh:22
Point< std::common_type_t< T, U > > operator-(Point< T > left, Point< U > right)
Definition point.hh:134
Rectangle< double > roundCorners(Rectangle< double > r)
Definition rectangle.hh:345
T center(Segment< T > s)
Definition linearsegment.hh:246
Rectangle< T > make_rect(T x, T y, T width, T height)
Definition rectangle.hh:284
Rectangle< T > make_rect_from_start_end(Point< T > start, Point< T > end)
Definition rectangle.hh:296
Segment< double > roundOutward(Segment< double > s)
Definition linearsegment.hh:240
std::ostream & operator<<(std::ostream &os, const Segment< T > &s)
Definition linearsegment.hh:235
Segment< T > make_segment_from_start_end(T start, T end)
Definition linearsegment.hh:229
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
Segment< int > const right(3, 7)
const auto rect
Definition rectangletests.cc:335
T round_to_multiple_of(T value, T factor)
Definition rounding.hh:32
SampleIterator< const uint8_t > result
Definition sampleiterator-tests.cc:94
const SampleIterator< const uint8_t > start(nullptr, initial_offset, bps)