Scroom  0.14
TweakRulers Class Reference
Collaboration diagram for TweakRulers:
Collaboration graph

Public Types

using Ptr = boost::shared_ptr< TweakRulers >
 
using Point = Scroom::Utils::Point< double >
 

Public Member Functions

Scroom::Utils::Rectangle< double > tweakRulers (Point currentPosition, Scroom::Utils::Point< int > drawingAreaSize, int zoom) const
 
void setAspectRatio (Point aspectRatio_)
 

Static Public Member Functions

static Ptr create (Point aspectRatio_)
 

Private Member Functions

 TweakRulers (Point aspectRatio_)
 

Private Attributes

Point aspectRatio
 

Member Typedef Documentation

◆ Point

◆ Ptr

using TweakRulers::Ptr = boost::shared_ptr<TweakRulers>

Constructor & Destructor Documentation

◆ TweakRulers()

TweakRulers::TweakRulers ( Point  aspectRatio_)
inlineexplicitprivate
101  : aspectRatio(aspectRatio_)
102  {
103  }

Referenced by create().

Here is the caller graph for this function:

Member Function Documentation

◆ create()

static Ptr TweakRulers::create ( Point  aspectRatio_)
inlinestatic
89 { return Ptr(new TweakRulers(aspectRatio_)); }
Here is the call graph for this function:

◆ setAspectRatio()

void TweakRulers::setAspectRatio ( Point  aspectRatio_)
inline
97 { aspectRatio = aspectRatio_; }

◆ tweakRulers()

Scroom::Utils::Rectangle<double> TweakRulers::tweakRulers ( Point  currentPosition,
Scroom::Utils::Point< int >  drawingAreaSize,
int  zoom 
) const
inline
93  {
94  return Scroom::Utils::make_rect(currentPosition, drawingAreaSize.to<double>() / pixelSizeFromZoom(zoom)) / aspectRatio;
95  }
Here is the call graph for this function:

Member Data Documentation

◆ aspectRatio

Point TweakRulers::aspectRatio
private

Referenced by setAspectRatio(), and tweakRulers().


The documentation for this class was generated from the following file:
TweakRulers::aspectRatio
Point aspectRatio
Definition: view.cc:106
Scroom::Utils::make_rect
Rectangle< T > make_rect(T x, T y, T width, T height)
Definition: rectangle.hh:284
Scroom::Utils::Point::to
Point< U > to() const
Definition: point.hh:103
TweakRulers::TweakRulers
TweakRulers(Point aspectRatio_)
Definition: view.cc:100
pixelSizeFromZoom
double pixelSizeFromZoom(int zoom)
Definition: cairo-helpers.cc:112
TweakRulers::Ptr
boost::shared_ptr< TweakRulers > Ptr
Definition: view.cc:86