Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
Selection Struct Reference

#include <viewinterface.hh>

Collaboration diagram for Selection:
Collaboration graph

Public Types

using Point = Scroom::Utils::Point< double >
 

Public Member Functions

 Selection (double x, double y)
 
 Selection (Point point)
 
 Selection (Point start_, Point end_)
 
Selectionoperator= (const Point &p)
 
double width () const
 
double height () const
 
double length () const
 

Public Attributes

Point start
 
Point end
 

Detailed Description

Structure that represents a selection made by the user.

Member Typedef Documentation

◆ Point

Constructor & Destructor Documentation

◆ Selection() [1/3]

Selection::Selection ( double  x,
double  y 
)
inline
48 {
49 }
Point< T > make_point(T x, T y)
Definition point.hh:116
Definition viewinterface.hh:37

◆ Selection() [2/3]

Selection::Selection ( Point  point)
inlineexplicit
52 : Selection(point, point)
53 {
54 }

◆ Selection() [3/3]

Selection::Selection ( Point  start_,
Point  end_ 
)
inline
57 : start(start_)
58 , end(end_)
59 {
60 }
Point end
Definition viewinterface.hh:43
Point start
Definition viewinterface.hh:42

Member Function Documentation

◆ height()

double Selection::height ( ) const
inline
70{ return abs(end.y - start.y); }
value_type y
Definition point.hh:112

Referenced by MeasureHandler::displayMeasurement(), and length().

Here is the caller graph for this function:

◆ length()

double Selection::length ( ) const
inline
71{ return std::hypot(width(), height()); }
double height() const
Definition viewinterface.hh:70
double width() const
Definition viewinterface.hh:69

Referenced by MeasureHandler::displayMeasurement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

Selection & Selection::operator= ( const Point p)
inline
63 {
64 start = p;
65 end = p;
66 return *this;
67 }
PresentationInterfaceStub::Ptr const p
Definition determine-size-test.cc:172

◆ width()

double Selection::width ( ) const
inline
69{ return abs(end.x - start.x); }
value_type x
Definition point.hh:111

Referenced by MeasureHandler::displayMeasurement(), and length().

Here is the caller graph for this function:

Member Data Documentation

◆ end

◆ start

Point Selection::start

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