Scroom  0.14
anonymous_namespace{sizedeterminer.cc} Namespace Reference

Functions

Scroom::Utils::Rectangle< double > DetermineSize (const std::list< PresentationInterface::Ptr > &presentations)
 
template<typename K , typename V >
std::list< K > keys (std::map< K, V > const &m)
 

Function Documentation

◆ DetermineSize()

Scroom::Utils::Rectangle<double> anonymous_namespace{sizedeterminer.cc}::DetermineSize ( const std::list< PresentationInterface::Ptr > &  presentations)
19  {
20  double left = std::numeric_limits<double>::max();
21  double top = std::numeric_limits<double>::max();
22  double right = std::numeric_limits<double>::min();
23  double bottom = std::numeric_limits<double>::min();
24 
26  {
27  Scroom::Utils::Rectangle<double> const rect = p->getRect();
28  left = std::min(left, rect.getLeft());
29  top = std::min(top, rect.getTop());
30  right = std::max(right, rect.getRight());
31  bottom = std::max(bottom, rect.getBottom());
32  }
33  return {left, top, right - left, bottom - top};
34  }

Referenced by SizeDeterminer::getRect().

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

◆ keys()

template<typename K , typename V >
std::list<K> anonymous_namespace{sizedeterminer.cc}::keys ( std::map< K, V > const &  m)
38  {
39  std::list<K> k;
40  for(auto const& p: m)
41  {
42  k.push_back(p.first);
43  }
44 
45  return k;
46  }

Referenced by SizeDeterminer::getRect().

Here is the caller graph for this function:
Scroom::Utils::Rectangle::getBottom
value_type getBottom() const
Definition: rectangle.hh:112
presentations
static std::list< PresentationInterface::WeakPtr > presentations
Definition: callbacks.cc:57
PresentationInterface::Ptr
boost::shared_ptr< PresentationInterface > Ptr
Definition: presentationinterface.hh:74
Scroom::Utils::Rectangle::getRight
value_type getRight() const
Definition: rectangle.hh:114
Scroom::Utils::Rectangle::getLeft
value_type getLeft() const
Definition: rectangle.hh:110
Scroom::Utils::Rectangle< double >
Scroom::Utils::Rectangle::getTop
value_type getTop() const
Definition: rectangle.hh:108