Scroom 0.14-48-ga0fee447
Loading...
Searching...
No Matches
RectangleHorizontalTestScaffold Class Reference
Inheritance diagram for RectangleHorizontalTestScaffold:
Inheritance graph
Collaboration diagram for RectangleHorizontalTestScaffold:
Collaboration graph

Public Member Functions

 RectangleHorizontalTestScaffold (int horizontalStart, int horizontalSize)
 
 RectangleHorizontalTestScaffold ()=default
 
 RectangleHorizontalTestScaffold (const Rectangle< int > &r)
 
int getSize () const
 
int getStart () const
 
int getEnd () const
 
bool contains (int x) const
 
bool contains (const RectangleHorizontalTestScaffold &other) const
 
RectangleHorizontalTestScaffold intersection (const RectangleHorizontalTestScaffold &other) const
 
Rectangle moveTo (int x)
 
- Public Member Functions inherited from Scroom::Utils::Rectangle< int >
 Rectangle ()=default
 
 Rectangle (value_type x_, value_type y_, value_type width_, value_type height_)
 
 Rectangle (const Segment< value_type > &horizontally_, const Segment< value_type > &vertically_)
 
 Rectangle (const cairo_rectangle_int_t &rect)
 
 Rectangle (std::enable_if_t<!T_is_int, Rectangle< int > const & > rect)
 
cairo_rectangle_int_t toGdkRectangle () const
 
Rectangle moveTo (xy_type const &other) const
 
Rectangle moveTo (value_type const &x, value_type const &y) const
 
bool contains (xy_type const &other) const
 
bool contains (const Rectangle &other) const
 
bool intersects (const Rectangle &other) const
 
void reduceSizeToMultipleOf (value_type size)
 
Rectangle intersection (const Rectangle &other) const
 
Rectangle< std::common_type_t< int, U > > intersection (const Rectangle< U > &other) const
 
value_type getTop () const
 
value_type getLeft () const
 
value_type getBottom () const
 
value_type getRight () const
 
void setTop (value_type v)
 
void setLeft (value_type v)
 
void setBottom (value_type v)
 
void setRight (value_type v)
 
value_type getWidth () const
 
value_type getHeight () const
 
value_type x () const
 
value_type y () const
 
value_type width () const
 
value_type height () const
 
xy_type getTopLeft () const
 
xy_type getTopRight () const
 
xy_type getBottomLeft () const
 
xy_type getBottomRight () const
 
bool isEmpty () const
 
Rectangle< value_typeleftOf (value_type v) const
 
Rectangle< value_typeleftOf (Rectangle< value_type > const &r) const
 
Rectangle< value_typerightOf (value_type v) const
 
Rectangle< value_typerightOf (Rectangle< value_type > const &r) const
 
Rectangle< value_typeabove (value_type v) const
 
Rectangle< value_typeabove (Rectangle< value_type > const &r) const
 
Rectangle< value_typebelow (value_type v) const
 
Rectangle< value_typebelow (Rectangle< value_type > const &r) const
 
bool operator== (const Rectangle &other) const
 
bool operator!= (const Rectangle &other) const
 
Rectangle< value_type > & operator+= (xy_type const &other)
 
Rectangle< value_type > & operator-= (xy_type const &other)
 
Rectangle< value_type > & operator*= (value_type other)
 
Rectangle< value_type > & operator*= (xy_type const &other)
 
Rectangle< value_type > & operator/= (value_type other)
 
Rectangle< value_type > & operator/= (xy_type const &other)
 
const Segment< value_type > & getHorizontally () const
 
const Segment< value_type > & getVertically () const
 
void setSize (xy_type const &s)
 
xy_type getSize () const
 
Rectangle< U > to () const
 

Static Private Attributes

static const int verticalStart = -1
 
static const int verticalContainedStart = 0
 
static const int verticalContainedWidth = 1
 
static const int verticalSize = 5
 

Additional Inherited Members

- Public Types inherited from Scroom::Utils::Rectangle< int >
using value_type = int
 
using xy_type = Point< int >
 

Constructor & Destructor Documentation

◆ RectangleHorizontalTestScaffold() [1/3]

RectangleHorizontalTestScaffold::RectangleHorizontalTestScaffold ( int  horizontalStart,
int  horizontalSize 
)
inline
34 : Rectangle(horizontalStart, verticalStart, horizontalSize, verticalSize)
35 {
36 }
static const int verticalStart
Definition rectangletests.cc:27
static const int verticalSize
Definition rectangletests.cc:30

◆ RectangleHorizontalTestScaffold() [2/3]

RectangleHorizontalTestScaffold::RectangleHorizontalTestScaffold ( )
default

◆ RectangleHorizontalTestScaffold() [3/3]

RectangleHorizontalTestScaffold::RectangleHorizontalTestScaffold ( const Rectangle< int > &  r)
inline
41 : Rectangle(r)
42 {
43 }
Scroom::Utils::Rectangle< double > const r
Definition transformpresentation_test.cc:65

Member Function Documentation

◆ contains() [1/2]

bool RectangleHorizontalTestScaffold::contains ( const RectangleHorizontalTestScaffold other) const
inline
51{ return Rectangle<int>::contains(other); }
Definition rectangle.hh:29

◆ contains() [2/2]

bool RectangleHorizontalTestScaffold::contains ( int  x) const
inline
49{ return Rectangle::contains(make_point(x, verticalContainedStart)); }
static const int verticalContainedStart
Definition rectangletests.cc:28
value_type x() const
Definition rectangle.hh:125
Point< T > make_point(T x, T y)
Definition point.hh:116
Here is the call graph for this function:

◆ getEnd()

int RectangleHorizontalTestScaffold::getEnd ( ) const
inline
48{ return getLeft() + getWidth(); }
value_type getWidth() const
Definition rectangle.hh:121
value_type getLeft() const
Definition rectangle.hh:110
Here is the call graph for this function:

◆ getSize()

int RectangleHorizontalTestScaffold::getSize ( ) const
inline
45{ return getWidth(); }
Here is the call graph for this function:

◆ getStart()

int RectangleHorizontalTestScaffold::getStart ( ) const
inline
47{ return getLeft(); }
Here is the call graph for this function:

◆ intersection()

RectangleHorizontalTestScaffold RectangleHorizontalTestScaffold::intersection ( const RectangleHorizontalTestScaffold other) const
inline
54 {
55 return Rectangle<int>::intersection(other);
56 }

◆ moveTo()

Rectangle RectangleHorizontalTestScaffold::moveTo ( int  x)
inline
Here is the call graph for this function:

Member Data Documentation

◆ verticalContainedStart

const int RectangleHorizontalTestScaffold::verticalContainedStart = 0
staticprivate

Referenced by contains(), and moveTo().

◆ verticalContainedWidth

const int RectangleHorizontalTestScaffold::verticalContainedWidth = 1
staticprivate

◆ verticalSize

const int RectangleHorizontalTestScaffold::verticalSize = 5
staticprivate

◆ verticalStart

const int RectangleHorizontalTestScaffold::verticalStart = -1
staticprivate

The documentation for this class was generated from the following file: