Mir
Namespaces | Classes | Typedefs | Functions
mir::geometry Namespace Reference

Basic geometry types. Types for dimensions, displacements, etc. and the operations that they support. More...

Namespaces

 detail
 

Classes

struct  Displacement
 
class  Length
 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...
 
struct  Point
 
struct  Rectangle
 
class  Rectangles
 A collection of rectangles (with possible duplicates). More...
 
struct  Size
 

Typedefs

typedef detail::IntWrapper< struct WidthTag > Width
 
typedef detail::IntWrapper< struct HeightTag > Height
 
typedef detail::IntWrapper< struct StrideTag > Stride
 
typedef detail::IntWrapper< struct XTag > X
 
typedef detail::IntWrapper< struct YTag > Y
 
typedef detail::IntWrapper< struct DeltaXTag > DeltaX
 
typedef detail::IntWrapper< struct DeltaYTag > DeltaY
 

Functions

constexpr DeltaX operator+ (DeltaX lhs, DeltaX rhs)
 
constexpr DeltaY operator+ (DeltaY lhs, DeltaY rhs)
 
constexpr DeltaX operator- (DeltaX lhs, DeltaX rhs)
 
constexpr DeltaY operator- (DeltaY lhs, DeltaY rhs)
 
constexpr X operator+ (X lhs, DeltaX rhs)
 
constexpr Y operator+ (Y lhs, DeltaY rhs)
 
constexpr X operator- (X lhs, DeltaX rhs)
 
constexpr Y operator- (Y lhs, DeltaY rhs)
 
Xoperator+= (X &lhs, DeltaX rhs)
 
Yoperator+= (Y &lhs, DeltaY rhs)
 
Xoperator-= (X &lhs, DeltaX rhs)
 
Yoperator-= (Y &lhs, DeltaY rhs)
 
constexpr Width operator+ (Width lhs, DeltaX rhs)
 
constexpr Height operator+ (Height lhs, DeltaY rhs)
 
constexpr Width operator- (Width lhs, DeltaX rhs)
 
constexpr Height operator- (Height lhs, DeltaY rhs)
 
constexpr DeltaX operator- (X lhs, X rhs)
 
constexpr DeltaY operator- (Y lhs, Y rhs)
 
constexpr DeltaX operator- (Width lhs, Width rhs)
 
constexpr DeltaY operator- (Height lhs, Height rhs)
 
template<typename Scalar >
constexpr Width operator * (Scalar scale, Width const &w)
 
template<typename Scalar >
constexpr Height operator * (Scalar scale, Height const &h)
 
template<typename Scalar >
constexpr DeltaX operator * (Scalar scale, DeltaX const &dx)
 
template<typename Scalar >
constexpr DeltaY operator * (Scalar scale, DeltaY const &dy)
 
template<typename Scalar >
constexpr Width operator * (Width const &w, Scalar scale)
 
template<typename Scalar >
constexpr Height operator * (Height const &h, Scalar scale)
 
template<typename Scalar >
constexpr DeltaX operator * (DeltaX const &dx, Scalar scale)
 
template<typename Scalar >
constexpr DeltaY operator * (DeltaY const &dy, Scalar scale)
 
template<typename Target , typename Source >
constexpr Target dim_cast (Source s)
 
constexpr bool operator== (Displacement const &lhs, Displacement const &rhs)
 
constexpr bool operator!= (Displacement const &lhs, Displacement const &rhs)
 
std::ostream & operator<< (std::ostream &out, Displacement const &value)
 
constexpr Displacement operator+ (Displacement const &lhs, Displacement const &rhs)
 
constexpr Displacement operator- (Displacement const &lhs, Displacement const &rhs)
 
constexpr Point operator+ (Point const &lhs, Displacement const &rhs)
 
constexpr Point operator+ (Displacement const &lhs, Point const &rhs)
 
constexpr Point operator- (Point const &lhs, Displacement const &rhs)
 
constexpr Displacement operator- (Point const &lhs, Point const &rhs)
 
bool operator< (Displacement const &lhs, Displacement const &rhs)
 
template<typename Scalar >
constexpr Displacement operator * (Scalar scale, Displacement const &disp)
 
template<typename Scalar >
constexpr Displacement operator * (Displacement const &disp, Scalar scale)
 
constexpr Length operator""_mm (long double mag)
 
constexpr Length operator""_mm (unsigned long long mag)
 
constexpr Length operator""_cm (long double mag)
 
constexpr Length operator""_cm (unsigned long long mag)
 
constexpr Length operator""_in (long double mag)
 
constexpr Length operator""_in (unsigned long long mag)
 
constexpr bool operator== (Point const &lhs, Point const &rhs)
 
constexpr bool operator != (Point const &lhs, Point const &rhs)
 
constexpr Point operator+ (Point lhs, DeltaX rhs)
 
constexpr Point operator+ (Point lhs, DeltaY rhs)
 
constexpr Point operator- (Point lhs, DeltaX rhs)
 
constexpr Point operator- (Point lhs, DeltaY rhs)
 
Pointoperator+= (Point &lhs, DeltaX rhs)
 
Pointoperator+= (Point &lhs, DeltaY rhs)
 
Pointoperator-= (Point &lhs, DeltaX rhs)
 
Pointoperator-= (Point &lhs, DeltaY rhs)
 
std::ostream & operator<< (std::ostream &out, Point const &value)
 
constexpr bool operator== (Rectangle const &lhs, Rectangle const &rhs)
 
constexpr bool operator != (Rectangle const &lhs, Rectangle const &rhs)
 
std::ostream & operator<< (std::ostream &out, Rectangle const &value)
 
std::ostream & operator<< (std::ostream &out, Rectangles const &value)
 
constexpr bool operator== (Size const &lhs, Size const &rhs)
 
constexpr bool operator != (Size const &lhs, Size const &rhs)
 
std::ostream & operator<< (std::ostream &out, Size const &value)
 
template<typename Scalar >
constexpr Size operator * (Scalar scale, Size const &size)
 
template<typename Scalar >
constexpr Size operator * (Size const &size, Scalar scale)
 

Detailed Description

Basic geometry types. Types for dimensions, displacements, etc. and the operations that they support.

Typedef Documentation

◆ DeltaX

typedef detail::IntWrapper<struct DeltaXTag> mir::geometry::DeltaX

◆ DeltaY

typedef detail::IntWrapper<struct DeltaYTag> mir::geometry::DeltaY

◆ Height

typedef detail::IntWrapper<struct HeightTag> mir::geometry::Height

◆ Stride

typedef detail::IntWrapper<struct StrideTag> mir::geometry::Stride

◆ Width

typedef detail::IntWrapper<struct WidthTag> mir::geometry::Width

◆ X

typedef detail::IntWrapper<struct XTag> mir::geometry::X

◆ Y

typedef detail::IntWrapper<struct YTag> mir::geometry::Y

Function Documentation

◆ dim_cast()

template<typename Target , typename Source >
constexpr Target mir::geometry::dim_cast ( Source  s)
inline

◆ operator !=() [1/3]

constexpr bool mir::geometry::operator != ( Size const &  lhs,
Size const &  rhs 
)
inline

◆ operator !=() [2/3]

constexpr bool mir::geometry::operator != ( Point const &  lhs,
Point const &  rhs 
)
inline

◆ operator !=() [3/3]

constexpr bool mir::geometry::operator != ( Rectangle const &  lhs,
Rectangle const &  rhs 
)
inline

◆ operator *() [1/12]

template<typename Scalar >
constexpr Size mir::geometry::operator * ( Scalar  scale,
Size const &  size 
)
inline

◆ operator *() [2/12]

template<typename Scalar >
constexpr Size mir::geometry::operator * ( Size const &  size,
Scalar  scale 
)
inline

◆ operator *() [3/12]

template<typename Scalar >
constexpr Displacement mir::geometry::operator * ( Scalar  scale,
Displacement const &  disp 
)
inline

◆ operator *() [4/12]

template<typename Scalar >
constexpr Displacement mir::geometry::operator * ( Displacement const &  disp,
Scalar  scale 
)
inline

◆ operator *() [5/12]

template<typename Scalar >
constexpr Width mir::geometry::operator * ( Scalar  scale,
Width const &  w 
)
inline

◆ operator *() [6/12]

template<typename Scalar >
constexpr Height mir::geometry::operator * ( Scalar  scale,
Height const &  h 
)
inline

◆ operator *() [7/12]

template<typename Scalar >
constexpr DeltaX mir::geometry::operator * ( Scalar  scale,
DeltaX const &  dx 
)
inline

◆ operator *() [8/12]

template<typename Scalar >
constexpr DeltaY mir::geometry::operator * ( Scalar  scale,
DeltaY const &  dy 
)
inline

◆ operator *() [9/12]

template<typename Scalar >
constexpr Width mir::geometry::operator * ( Width const &  w,
Scalar  scale 
)
inline

◆ operator *() [10/12]

template<typename Scalar >
constexpr Height mir::geometry::operator * ( Height const &  h,
Scalar  scale 
)
inline

◆ operator *() [11/12]

template<typename Scalar >
constexpr DeltaX mir::geometry::operator * ( DeltaX const &  dx,
Scalar  scale 
)
inline

◆ operator *() [12/12]

template<typename Scalar >
constexpr DeltaY mir::geometry::operator * ( DeltaY const &  dy,
Scalar  scale 
)
inline

◆ operator!=()

constexpr bool mir::geometry::operator!= ( Displacement const &  lhs,
Displacement const &  rhs 
)
inline

◆ operator""_cm() [1/2]

constexpr Length mir::geometry::operator""_cm ( long double  mag)
inline

◆ operator""_cm() [2/2]

constexpr Length mir::geometry::operator""_cm ( unsigned long long  mag)
inline

◆ operator""_in() [1/2]

constexpr Length mir::geometry::operator""_in ( long double  mag)
inline

◆ operator""_in() [2/2]

constexpr Length mir::geometry::operator""_in ( unsigned long long  mag)
inline

◆ operator""_mm() [1/2]

constexpr Length mir::geometry::operator""_mm ( long double  mag)
inline

◆ operator""_mm() [2/2]

constexpr Length mir::geometry::operator""_mm ( unsigned long long  mag)
inline

◆ operator+() [1/11]

constexpr Point mir::geometry::operator+ ( Point  lhs,
DeltaX  rhs 
)
inline

◆ operator+() [2/11]

constexpr Point mir::geometry::operator+ ( Point  lhs,
DeltaY  rhs 
)
inline

◆ operator+() [3/11]

constexpr Displacement mir::geometry::operator+ ( Displacement const &  lhs,
Displacement const &  rhs 
)
inline

◆ operator+() [4/11]

constexpr Point mir::geometry::operator+ ( Point const &  lhs,
Displacement const &  rhs 
)
inline

◆ operator+() [5/11]

constexpr Point mir::geometry::operator+ ( Displacement const &  lhs,
Point const &  rhs 
)
inline

◆ operator+() [6/11]

constexpr DeltaX mir::geometry::operator+ ( DeltaX  lhs,
DeltaX  rhs 
)
inline

◆ operator+() [7/11]

constexpr DeltaY mir::geometry::operator+ ( DeltaY  lhs,
DeltaY  rhs 
)
inline

◆ operator+() [8/11]

constexpr X mir::geometry::operator+ ( X  lhs,
DeltaX  rhs 
)
inline

◆ operator+() [9/11]

constexpr Y mir::geometry::operator+ ( Y  lhs,
DeltaY  rhs 
)
inline

◆ operator+() [10/11]

constexpr Width mir::geometry::operator+ ( Width  lhs,
DeltaX  rhs 
)
inline

◆ operator+() [11/11]

constexpr Height mir::geometry::operator+ ( Height  lhs,
DeltaY  rhs 
)
inline

◆ operator+=() [1/4]

Point& mir::geometry::operator+= ( Point lhs,
DeltaX  rhs 
)
inline

◆ operator+=() [2/4]

Point& mir::geometry::operator+= ( Point lhs,
DeltaY  rhs 
)
inline

◆ operator+=() [3/4]

X& mir::geometry::operator+= ( X lhs,
DeltaX  rhs 
)
inline

◆ operator+=() [4/4]

Y& mir::geometry::operator+= ( Y lhs,
DeltaY  rhs 
)
inline

◆ operator-() [1/15]

constexpr Point mir::geometry::operator- ( Point  lhs,
DeltaX  rhs 
)
inline

◆ operator-() [2/15]

constexpr Point mir::geometry::operator- ( Point  lhs,
DeltaY  rhs 
)
inline

◆ operator-() [3/15]

constexpr Displacement mir::geometry::operator- ( Displacement const &  lhs,
Displacement const &  rhs 
)
inline

◆ operator-() [4/15]

constexpr Point mir::geometry::operator- ( Point const &  lhs,
Displacement const &  rhs 
)
inline

◆ operator-() [5/15]

constexpr Displacement mir::geometry::operator- ( Point const &  lhs,
Point const &  rhs 
)
inline

◆ operator-() [6/15]

constexpr DeltaX mir::geometry::operator- ( DeltaX  lhs,
DeltaX  rhs 
)
inline

◆ operator-() [7/15]

constexpr DeltaY mir::geometry::operator- ( DeltaY  lhs,
DeltaY  rhs 
)
inline

◆ operator-() [8/15]

constexpr X mir::geometry::operator- ( X  lhs,
DeltaX  rhs 
)
inline

◆ operator-() [9/15]

constexpr Y mir::geometry::operator- ( Y  lhs,
DeltaY  rhs 
)
inline

◆ operator-() [10/15]

constexpr Width mir::geometry::operator- ( Width  lhs,
DeltaX  rhs 
)
inline

◆ operator-() [11/15]

constexpr Height mir::geometry::operator- ( Height  lhs,
DeltaY  rhs 
)
inline

◆ operator-() [12/15]

constexpr DeltaX mir::geometry::operator- ( X  lhs,
X  rhs 
)
inline

◆ operator-() [13/15]

constexpr DeltaY mir::geometry::operator- ( Y  lhs,
Y  rhs 
)
inline

◆ operator-() [14/15]

constexpr DeltaX mir::geometry::operator- ( Width  lhs,
Width  rhs 
)
inline

◆ operator-() [15/15]

constexpr DeltaY mir::geometry::operator- ( Height  lhs,
Height  rhs 
)
inline

◆ operator-=() [1/4]

Point& mir::geometry::operator-= ( Point lhs,
DeltaX  rhs 
)
inline

◆ operator-=() [2/4]

Point& mir::geometry::operator-= ( Point lhs,
DeltaY  rhs 
)
inline

◆ operator-=() [3/4]

X& mir::geometry::operator-= ( X lhs,
DeltaX  rhs 
)
inline

◆ operator-=() [4/4]

Y& mir::geometry::operator-= ( Y lhs,
DeltaY  rhs 
)
inline

◆ operator<()

bool mir::geometry::operator< ( Displacement const &  lhs,
Displacement const &  rhs 
)
inline

◆ operator<<() [1/5]

std::ostream& mir::geometry::operator<< ( std::ostream &  out,
Size const &  value 
)

◆ operator<<() [2/5]

std::ostream& mir::geometry::operator<< ( std::ostream &  out,
Displacement const &  value 
)

◆ operator<<() [3/5]

std::ostream& mir::geometry::operator<< ( std::ostream &  out,
Rectangles const &  value 
)

◆ operator<<() [4/5]

std::ostream& mir::geometry::operator<< ( std::ostream &  out,
Point const &  value 
)

◆ operator<<() [5/5]

std::ostream& mir::geometry::operator<< ( std::ostream &  out,
Rectangle const &  value 
)

◆ operator==() [1/4]

constexpr bool mir::geometry::operator== ( Size const &  lhs,
Size const &  rhs 
)
inline

◆ operator==() [2/4]

constexpr bool mir::geometry::operator== ( Point const &  lhs,
Point const &  rhs 
)
inline

◆ operator==() [3/4]

constexpr bool mir::geometry::operator== ( Displacement const &  lhs,
Displacement const &  rhs 
)
inline

◆ operator==() [4/4]

constexpr bool mir::geometry::operator== ( Rectangle const &  lhs,
Rectangle const &  rhs 
)
inline

Copyright © 2012-2019 Canonical Ltd.
Generated on Fri Feb 1 22:50:25 UTC 2019
This documentation is licensed under the GPL version 2 or 3.