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

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

Function Documentation

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

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016