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
 
 generic
 

Classes

struct  WidthTag
 These tag types determine what type of dimension a value holds and what operations are possible with it. They are only used as template paramaters, are never instantiated and should only require forward declarations, but some compiler versions seem to fail if they aren't given real declarations. More...
 
struct  HeightTag
 
struct  XTag
 
struct  YTag
 
struct  DeltaXTag
 
struct  DeltaYTag
 
struct  Displacement
 
struct  Point
 
struct  Rectangle
 
class  Rectangles
 A collection of rectangles (with possible duplicates). More...
 
struct  Size
 

Typedefs

typedef detail::IntWrapper< WidthTagWidth
 
typedef detail::IntWrapper< HeightTagHeight
 
typedef detail::IntWrapper< struct StrideTag > Stride
 
typedef detail::IntWrapper< XTagX
 
typedef detail::IntWrapper< YTagY
 
typedef detail::IntWrapper< DeltaXTagDeltaX
 
typedef detail::IntWrapper< DeltaYTagDeltaY
 
using WidthF = generic::Width< float >
 
using HeightF = generic::Height< float >
 
using XF = generic::X< float >
 
using YF = generic::Y< float >
 
using DeltaXF = generic::DeltaX< float >
 
using DeltaYF = generic::DeltaY< float >
 
using DisplacementF = generic::Displacement< generic::Value< float >::Wrapper >
 
using PointF = generic::Point< generic::Value< float >::Wrapper >
 
using RectangleF = generic::Rectangle< PointF, SizeF >
 
using SizeF = generic::Size< generic::Value< float >::Wrapper >
 

Functions

template<template< typename > typename T>
constexpr T< DeltaXTagoperator+ (T< DeltaXTag > lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
constexpr T< DeltaYTagoperator+ (T< DeltaYTag > lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
constexpr T< DeltaXTagoperator- (T< DeltaXTag > lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
constexpr T< DeltaYTagoperator- (T< DeltaYTag > lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
constexpr T< DeltaXTagoperator- (T< DeltaXTag > rhs)
 
template<template< typename > typename T>
constexpr T< DeltaYTagoperator- (T< DeltaYTag > rhs)
 
template<template< typename > typename T>
T< DeltaXTag > & operator+= (T< DeltaXTag > &lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
T< DeltaYTag > & operator+= (T< DeltaYTag > &lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
T< DeltaXTag > & operator-= (T< DeltaXTag > &lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
T< DeltaYTag > & operator-= (T< DeltaYTag > &lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
constexpr T< XTagoperator+ (T< XTag > lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
constexpr T< YTagoperator+ (T< YTag > lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
constexpr T< XTagoperator- (T< XTag > lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
constexpr T< YTagoperator- (T< YTag > lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
T< XTag > & operator+= (T< XTag > &lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
T< YTag > & operator+= (T< YTag > &lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
T< XTag > & operator-= (T< XTag > &lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
T< YTag > & operator-= (T< YTag > &lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
constexpr T< WidthTagoperator+ (T< WidthTag > lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
constexpr T< HeightTagoperator+ (T< HeightTag > lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
constexpr T< WidthTagoperator- (T< WidthTag > lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
constexpr T< HeightTagoperator- (T< HeightTag > lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
T< WidthTag > & operator+= (T< WidthTag > &lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
T< HeightTag > & operator+= (T< HeightTag > &lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
T< WidthTag > & operator-= (T< WidthTag > &lhs, T< DeltaXTag > rhs)
 
template<template< typename > typename T>
T< HeightTag > & operator-= (T< HeightTag > &lhs, T< DeltaYTag > rhs)
 
template<template< typename > typename T>
constexpr T< WidthTagoperator+ (T< WidthTag > lhs, T< WidthTag > rhs)
 
template<template< typename > typename T>
constexpr T< HeightTagoperator+ (T< HeightTag > lhs, T< HeightTag > rhs)
 
template<template< typename > typename T>
T< WidthTag > & operator+= (T< WidthTag > &lhs, T< WidthTag > rhs)
 
template<template< typename > typename T>
T< HeightTag > & operator+= (T< HeightTag > &lhs, T< HeightTag > rhs)
 
template<template< typename > typename T>
constexpr T< DeltaXTagoperator- (T< XTag > lhs, T< XTag > rhs)
 
template<template< typename > typename T>
constexpr T< DeltaYTagoperator- (T< YTag > lhs, T< YTag > rhs)
 
template<template< typename > typename T>
constexpr T< DeltaXTagoperator- (T< WidthTag > lhs, T< WidthTag > rhs)
 
template<template< typename > typename T>
constexpr T< DeltaYTagoperator- (T< HeightTag > lhs, T< HeightTag > rhs)
 
template<template< typename > typename T, typename Scalar >
constexpr T< WidthTagoperator* (Scalar scale, T< WidthTag > const &w)
 
template<template< typename > typename T, typename Scalar >
constexpr T< HeightTagoperator* (Scalar scale, T< HeightTag > const &h)
 
template<template< typename > typename T, typename Scalar >
constexpr T< DeltaXTagoperator* (Scalar scale, T< DeltaXTag > const &dx)
 
template<template< typename > typename T, typename Scalar >
constexpr T< DeltaYTagoperator* (Scalar scale, T< DeltaYTag > const &dy)
 
template<template< typename > typename T, typename Scalar >
constexpr T< WidthTagoperator* (T< WidthTag > const &w, Scalar scale)
 
template<template< typename > typename T, typename Scalar >
constexpr T< HeightTagoperator* (T< HeightTag > const &h, Scalar scale)
 
template<template< typename > typename T, typename Scalar >
constexpr T< DeltaXTagoperator* (T< DeltaXTag > const &dx, Scalar scale)
 
template<template< typename > typename T, typename Scalar >
constexpr T< DeltaYTagoperator* (T< DeltaYTag > const &dy, Scalar scale)
 
template<template< typename > typename T, typename Scalar >
constexpr T< WidthTagoperator/ (T< WidthTag > const &w, Scalar scale)
 
template<template< typename > typename T, typename Scalar >
constexpr T< HeightTagoperator/ (T< HeightTag > const &h, Scalar scale)
 
template<template< typename > typename T, typename Scalar >
constexpr T< DeltaXTagoperator/ (T< DeltaXTag > const &dx, Scalar scale)
 
template<template< typename > typename T, typename Scalar >
constexpr T< DeltaYTagoperator/ (T< DeltaYTag > const &dy, Scalar scale)
 
template<template< typename > typename T>
constexpr T< WidthTagas_width (T< DeltaXTag > const &dx)
 
template<template< typename > typename T>
constexpr T< HeightTagas_height (T< DeltaYTag > const &dy)
 
template<template< typename > typename T>
constexpr T< XTagas_x (T< DeltaXTag > const &dx)
 
template<template< typename > typename T>
constexpr T< YTagas_y (T< DeltaYTag > const &dy)
 
template<template< typename > typename T>
constexpr T< DeltaXTagas_delta (T< XTag > const &x)
 
template<template< typename > typename T>
constexpr T< DeltaYTagas_delta (T< YTag > const &y)
 
template<template< typename > typename T>
constexpr T< XTagas_x (T< WidthTag > const &w)
 
template<template< typename > typename T>
constexpr T< YTagas_y (T< HeightTag > const &h)
 
template<template< typename > typename T>
constexpr T< WidthTagas_width (T< XTag > const &x)
 
template<template< typename > typename T>
constexpr T< HeightTagas_height (T< YTag > const &y)
 
template<template< typename > typename T>
constexpr T< DeltaXTagas_delta (T< WidthTag > const &w)
 
template<template< typename > typename T>
constexpr T< DeltaYTagas_delta (T< HeightTag > const &h)
 
template<typename Target , typename Source >
constexpr Target dim_cast (Source s)
 
std::ostream & operator<< (std::ostream &out, Rectangles const &value)
 

Detailed Description

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

Typedef Documentation

◆ DeltaX

◆ DeltaXF

using mir::geometry::DeltaXF = typedef generic::DeltaX<float>

◆ DeltaY

◆ DeltaYF

using mir::geometry::DeltaYF = typedef generic::DeltaY<float>

◆ DisplacementF

◆ Height

◆ HeightF

using mir::geometry::HeightF = typedef generic::Height<float>

◆ PointF

using mir::geometry::PointF = typedef generic::Point<generic::Value<float>::Wrapper>

◆ RectangleF

◆ SizeF

using mir::geometry::SizeF = typedef generic::Size<generic::Value<float>::Wrapper>

◆ Stride

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

◆ Width

◆ WidthF

using mir::geometry::WidthF = typedef generic::Width<float>

◆ X

◆ XF

using mir::geometry::XF = typedef generic::X<float>

◆ Y

◆ YF

using mir::geometry::YF = typedef generic::Y<float>

Function Documentation

◆ as_delta() [1/4]

template<template< typename > typename T>
constexpr T<DeltaYTag> mir::geometry::as_delta ( T< HeightTag > const &  h)
inlineconstexpr

◆ as_delta() [2/4]

template<template< typename > typename T>
constexpr T<DeltaXTag> mir::geometry::as_delta ( T< WidthTag > const &  w)
inlineconstexpr

◆ as_delta() [3/4]

template<template< typename > typename T>
constexpr T<DeltaXTag> mir::geometry::as_delta ( T< XTag > const &  x)
inlineconstexpr

◆ as_delta() [4/4]

template<template< typename > typename T>
constexpr T<DeltaYTag> mir::geometry::as_delta ( T< YTag > const &  y)
inlineconstexpr

◆ as_height() [1/2]

template<template< typename > typename T>
constexpr T<HeightTag> mir::geometry::as_height ( T< DeltaYTag > const &  dy)
inlineconstexpr

◆ as_height() [2/2]

template<template< typename > typename T>
constexpr T<HeightTag> mir::geometry::as_height ( T< YTag > const &  y)
inlineconstexpr

◆ as_width() [1/2]

template<template< typename > typename T>
constexpr T<WidthTag> mir::geometry::as_width ( T< DeltaXTag > const &  dx)
inlineconstexpr

◆ as_width() [2/2]

template<template< typename > typename T>
constexpr T<WidthTag> mir::geometry::as_width ( T< XTag > const &  x)
inlineconstexpr

◆ as_x() [1/2]

template<template< typename > typename T>
constexpr T<XTag> mir::geometry::as_x ( T< DeltaXTag > const &  dx)
inlineconstexpr

◆ as_x() [2/2]

template<template< typename > typename T>
constexpr T<XTag> mir::geometry::as_x ( T< WidthTag > const &  w)
inlineconstexpr

◆ as_y() [1/2]

template<template< typename > typename T>
constexpr T<YTag> mir::geometry::as_y ( T< DeltaYTag > const &  dy)
inlineconstexpr

◆ as_y() [2/2]

template<template< typename > typename T>
constexpr T<YTag> mir::geometry::as_y ( T< HeightTag > const &  h)
inlineconstexpr

◆ dim_cast()

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

◆ operator*() [1/8]

template<template< typename > typename T, typename Scalar >
constexpr T<DeltaXTag> mir::geometry::operator* ( Scalar  scale,
T< DeltaXTag > const &  dx 
)
inlineconstexpr

◆ operator*() [2/8]

template<template< typename > typename T, typename Scalar >
constexpr T<DeltaYTag> mir::geometry::operator* ( Scalar  scale,
T< DeltaYTag > const &  dy 
)
inlineconstexpr

◆ operator*() [3/8]

template<template< typename > typename T, typename Scalar >
constexpr T<HeightTag> mir::geometry::operator* ( Scalar  scale,
T< HeightTag > const &  h 
)
inlineconstexpr

◆ operator*() [4/8]

template<template< typename > typename T, typename Scalar >
constexpr T<WidthTag> mir::geometry::operator* ( Scalar  scale,
T< WidthTag > const &  w 
)
inlineconstexpr

◆ operator*() [5/8]

template<template< typename > typename T, typename Scalar >
constexpr T<DeltaXTag> mir::geometry::operator* ( T< DeltaXTag > const &  dx,
Scalar  scale 
)
inlineconstexpr

◆ operator*() [6/8]

template<template< typename > typename T, typename Scalar >
constexpr T<DeltaYTag> mir::geometry::operator* ( T< DeltaYTag > const &  dy,
Scalar  scale 
)
inlineconstexpr

◆ operator*() [7/8]

template<template< typename > typename T, typename Scalar >
constexpr T<HeightTag> mir::geometry::operator* ( T< HeightTag > const &  h,
Scalar  scale 
)
inlineconstexpr

◆ operator*() [8/8]

template<template< typename > typename T, typename Scalar >
constexpr T<WidthTag> mir::geometry::operator* ( T< WidthTag > const &  w,
Scalar  scale 
)
inlineconstexpr

◆ operator+() [1/8]

template<template< typename > typename T>
constexpr T<DeltaXTag> mir::geometry::operator+ ( T< DeltaXTag lhs,
T< DeltaXTag rhs 
)
inlineconstexpr

◆ operator+() [2/8]

template<template< typename > typename T>
constexpr T<DeltaYTag> mir::geometry::operator+ ( T< DeltaYTag lhs,
T< DeltaYTag rhs 
)
inlineconstexpr

◆ operator+() [3/8]

template<template< typename > typename T>
constexpr T<HeightTag> mir::geometry::operator+ ( T< HeightTag lhs,
T< DeltaYTag rhs 
)
inlineconstexpr

◆ operator+() [4/8]

template<template< typename > typename T>
constexpr T<HeightTag> mir::geometry::operator+ ( T< HeightTag lhs,
T< HeightTag rhs 
)
inlineconstexpr

◆ operator+() [5/8]

template<template< typename > typename T>
constexpr T<WidthTag> mir::geometry::operator+ ( T< WidthTag lhs,
T< DeltaXTag rhs 
)
inlineconstexpr

◆ operator+() [6/8]

template<template< typename > typename T>
constexpr T<WidthTag> mir::geometry::operator+ ( T< WidthTag lhs,
T< WidthTag rhs 
)
inlineconstexpr

◆ operator+() [7/8]

template<template< typename > typename T>
constexpr T<XTag> mir::geometry::operator+ ( T< XTag lhs,
T< DeltaXTag rhs 
)
inlineconstexpr

◆ operator+() [8/8]

template<template< typename > typename T>
constexpr T<YTag> mir::geometry::operator+ ( T< YTag lhs,
T< DeltaYTag rhs 
)
inlineconstexpr

◆ operator+=() [1/8]

template<template< typename > typename T>
T<DeltaXTag>& mir::geometry::operator+= ( T< DeltaXTag > &  lhs,
T< DeltaXTag rhs 
)
inline

◆ operator+=() [2/8]

template<template< typename > typename T>
T<DeltaYTag>& mir::geometry::operator+= ( T< DeltaYTag > &  lhs,
T< DeltaYTag rhs 
)
inline

◆ operator+=() [3/8]

template<template< typename > typename T>
T<HeightTag>& mir::geometry::operator+= ( T< HeightTag > &  lhs,
T< DeltaYTag rhs 
)
inline

◆ operator+=() [4/8]

template<template< typename > typename T>
T<HeightTag>& mir::geometry::operator+= ( T< HeightTag > &  lhs,
T< HeightTag rhs 
)
inline

◆ operator+=() [5/8]

template<template< typename > typename T>
T<WidthTag>& mir::geometry::operator+= ( T< WidthTag > &  lhs,
T< DeltaXTag rhs 
)
inline

◆ operator+=() [6/8]

template<template< typename > typename T>
T<WidthTag>& mir::geometry::operator+= ( T< WidthTag > &  lhs,
T< WidthTag rhs 
)
inline

◆ operator+=() [7/8]

template<template< typename > typename T>
T<XTag>& mir::geometry::operator+= ( T< XTag > &  lhs,
T< DeltaXTag rhs 
)
inline

◆ operator+=() [8/8]

template<template< typename > typename T>
T<YTag>& mir::geometry::operator+= ( T< YTag > &  lhs,
T< DeltaYTag rhs 
)
inline

◆ operator-() [1/12]

template<template< typename > typename T>
constexpr T<DeltaXTag> mir::geometry::operator- ( T< DeltaXTag lhs,
T< DeltaXTag rhs 
)
inlineconstexpr

◆ operator-() [2/12]

template<template< typename > typename T>
constexpr T<DeltaXTag> mir::geometry::operator- ( T< DeltaXTag rhs)
inlineconstexpr

◆ operator-() [3/12]

template<template< typename > typename T>
constexpr T<DeltaYTag> mir::geometry::operator- ( T< DeltaYTag lhs,
T< DeltaYTag rhs 
)
inlineconstexpr

◆ operator-() [4/12]

template<template< typename > typename T>
constexpr T<DeltaYTag> mir::geometry::operator- ( T< DeltaYTag rhs)
inlineconstexpr

◆ operator-() [5/12]

template<template< typename > typename T>
constexpr T<HeightTag> mir::geometry::operator- ( T< HeightTag lhs,
T< DeltaYTag rhs 
)
inlineconstexpr

◆ operator-() [6/12]

template<template< typename > typename T>
constexpr T<DeltaYTag> mir::geometry::operator- ( T< HeightTag lhs,
T< HeightTag rhs 
)
inlineconstexpr

◆ operator-() [7/12]

template<template< typename > typename T>
constexpr T<WidthTag> mir::geometry::operator- ( T< WidthTag lhs,
T< DeltaXTag rhs 
)
inlineconstexpr

◆ operator-() [8/12]

template<template< typename > typename T>
constexpr T<DeltaXTag> mir::geometry::operator- ( T< WidthTag lhs,
T< WidthTag rhs 
)
inlineconstexpr

◆ operator-() [9/12]

template<template< typename > typename T>
constexpr T<XTag> mir::geometry::operator- ( T< XTag lhs,
T< DeltaXTag rhs 
)
inlineconstexpr

◆ operator-() [10/12]

template<template< typename > typename T>
constexpr T<DeltaXTag> mir::geometry::operator- ( T< XTag lhs,
T< XTag rhs 
)
inlineconstexpr

◆ operator-() [11/12]

template<template< typename > typename T>
constexpr T<YTag> mir::geometry::operator- ( T< YTag lhs,
T< DeltaYTag rhs 
)
inlineconstexpr

◆ operator-() [12/12]

template<template< typename > typename T>
constexpr T<DeltaYTag> mir::geometry::operator- ( T< YTag lhs,
T< YTag rhs 
)
inlineconstexpr

◆ operator-=() [1/6]

template<template< typename > typename T>
T<DeltaXTag>& mir::geometry::operator-= ( T< DeltaXTag > &  lhs,
T< DeltaXTag rhs 
)
inline

◆ operator-=() [2/6]

template<template< typename > typename T>
T<DeltaYTag>& mir::geometry::operator-= ( T< DeltaYTag > &  lhs,
T< DeltaYTag rhs 
)
inline

◆ operator-=() [3/6]

template<template< typename > typename T>
T<HeightTag>& mir::geometry::operator-= ( T< HeightTag > &  lhs,
T< DeltaYTag rhs 
)
inline

◆ operator-=() [4/6]

template<template< typename > typename T>
T<WidthTag>& mir::geometry::operator-= ( T< WidthTag > &  lhs,
T< DeltaXTag rhs 
)
inline

◆ operator-=() [5/6]

template<template< typename > typename T>
T<XTag>& mir::geometry::operator-= ( T< XTag > &  lhs,
T< DeltaXTag rhs 
)
inline

◆ operator-=() [6/6]

template<template< typename > typename T>
T<YTag>& mir::geometry::operator-= ( T< YTag > &  lhs,
T< DeltaYTag rhs 
)
inline

◆ operator/() [1/4]

template<template< typename > typename T, typename Scalar >
constexpr T<DeltaXTag> mir::geometry::operator/ ( T< DeltaXTag > const &  dx,
Scalar  scale 
)
inlineconstexpr

◆ operator/() [2/4]

template<template< typename > typename T, typename Scalar >
constexpr T<DeltaYTag> mir::geometry::operator/ ( T< DeltaYTag > const &  dy,
Scalar  scale 
)
inlineconstexpr

◆ operator/() [3/4]

template<template< typename > typename T, typename Scalar >
constexpr T<HeightTag> mir::geometry::operator/ ( T< HeightTag > const &  h,
Scalar  scale 
)
inlineconstexpr

◆ operator/() [4/4]

template<template< typename > typename T, typename Scalar >
constexpr T<WidthTag> mir::geometry::operator/ ( T< WidthTag > const &  w,
Scalar  scale 
)
inlineconstexpr

◆ operator<<()

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

Copyright © 2012-2022 Canonical Ltd.
Generated on śro, 1 cze 2022, 16:52:55 UTC
This documentation is licensed under the GPL version 2 or 3.