Mir
Public Types | Public Member Functions | List of all members
mir::geometry::Length Class Reference

Length represents a physical length in the real world. The number of pixels this equates to can then be calculated based on a given DPI. More...

#include <length.h>

Public Types

enum  Units { micrometres = 1, millimetres = 1000, centimetres = 10000, inches = 25400 }
 

Public Member Functions

 Length ()
 
 Length (Length const &)=default
 
Lengthoperator= (Length const &)=default
 
 Length (float mag, Units units)
 
float as (Units units) const
 
float as_pixels (float dpi) const
 
bool operator== (Length const &rhs) const
 
bool operator!= (Length const &rhs) const
 

Detailed Description

Length represents a physical length in the real world. The number of pixels this equates to can then be calculated based on a given DPI.

Member Enumeration Documentation

Enumerator
micrometres 
millimetres 
centimetres 
inches 

Constructor & Destructor Documentation

mir::geometry::Length::Length ( )
inline
mir::geometry::Length::Length ( Length const &  )
default
mir::geometry::Length::Length ( float  mag,
Units  units 
)
inline

Member Function Documentation

float mir::geometry::Length::as ( Units  units) const
inline
float mir::geometry::Length::as_pixels ( float  dpi) const
inline
bool mir::geometry::Length::operator!= ( Length const &  rhs) const
inline
Length& mir::geometry::Length::operator= ( Length const &  )
default
bool mir::geometry::Length::operator== ( Length const &  rhs) const
inline

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

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016