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

constexpr Length ()
 
constexpr Length (Length const &)=default
 
constexpr Length (float mag, Units units)
 
Lengthoperator= (Length const &)=default
 
constexpr float as (Units units) const
 
constexpr float as_pixels (float dpi) const
 
constexpr bool operator== (Length const &rhs) const
 
constexpr 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

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

Member Function Documentation

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

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

Copyright © 2012-2022 Canonical Ltd.
Generated on Tue Feb 1 20:51:23 UTC 2022
This documentation is licensed under the GPL version 2 or 3.