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

 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 parameters, 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  StrideTag
 
class  Rectangles
 A collection of rectangles (with possible duplicates). More...
 

Typedefs

using Width = generic::Width< int >
 
using Height = generic::Height< int >
 
using X = generic::X< int >
 
using Y = generic::Y< int >
 
using DeltaX = generic::DeltaX< int >
 
using DeltaY = generic::DeltaY< int >
 
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 Stride = generic::Value< int, StrideTag >
 
using Point = generic::Point< int >
 
using Size = generic::Size< int >
 
using Displacement = generic::Displacement< int >
 
using Rectangle = generic::Rectangle< int >
 
using PointF = generic::Point< float >
 
using SizeF = generic::Size< float >
 
using DisplacementF = generic::Displacement< float >
 
using RectangleF = generic::Rectangle< int >
 

Functions

template<typename T >
constexpr generic::Width< T > as_width (generic::DeltaX< T > const &dx)
 
template<typename T >
constexpr generic::Height< T > as_height (generic::DeltaY< T > const &dy)
 
template<typename T >
constexpr generic::X< T > as_x (generic::DeltaX< T > const &dx)
 
template<typename T >
constexpr generic::Y< T > as_y (generic::DeltaY< T > const &dy)
 
template<typename T >
constexpr generic::DeltaX< T > as_delta (generic::X< T > const &x)
 
template<typename T >
constexpr generic::DeltaY< T > as_delta (generic::Y< T > const &y)
 
template<typename T >
constexpr generic::X< T > as_x (generic::Width< T > const &w)
 
template<typename T >
constexpr generic::Y< T > as_y (generic::Height< T > const &h)
 
template<typename T >
constexpr generic::Width< T > as_width (generic::X< T > const &x)
 
template<typename T >
constexpr generic::Height< T > as_height (generic::Y< T > const &y)
 
template<typename T >
constexpr generic::DeltaX< T > as_delta (generic::Width< T > const &w)
 
template<typename T >
constexpr generic::DeltaY< T > as_delta (generic::Height< T > const &h)
 
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

using mir::geometry::DeltaX = typedef generic::DeltaX<int>

◆ DeltaXF

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

◆ DeltaY

using mir::geometry::DeltaY = typedef generic::DeltaY<int>

◆ DeltaYF

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

◆ Displacement

◆ DisplacementF

◆ Height

using mir::geometry::Height = typedef generic::Height<int>

◆ HeightF

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

◆ Point

using mir::geometry::Point = typedef generic::Point<int>

◆ PointF

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

◆ Rectangle

◆ RectangleF

◆ Size

using mir::geometry::Size = typedef generic::Size<int>

◆ SizeF

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

◆ Stride

◆ Width

using mir::geometry::Width = typedef generic::Width<int>

◆ WidthF

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

◆ X

using mir::geometry::X = typedef generic::X<int>

◆ XF

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

◆ Y

using mir::geometry::Y = typedef generic::Y<int>

◆ YF

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

Function Documentation

◆ as_delta() [1/4]

template<typename T >
constexpr generic::DeltaY<T> mir::geometry::as_delta ( generic::Height< T > const &  h)
inlineconstexpr

◆ as_delta() [2/4]

template<typename T >
constexpr generic::DeltaX<T> mir::geometry::as_delta ( generic::Width< T > const &  w)
inlineconstexpr

◆ as_delta() [3/4]

template<typename T >
constexpr generic::DeltaX<T> mir::geometry::as_delta ( generic::X< T > const &  x)
inlineconstexpr

◆ as_delta() [4/4]

template<typename T >
constexpr generic::DeltaY<T> mir::geometry::as_delta ( generic::Y< T > const &  y)
inlineconstexpr

◆ as_height() [1/2]

template<typename T >
constexpr generic::Height<T> mir::geometry::as_height ( generic::DeltaY< T > const &  dy)
inlineconstexpr

◆ as_height() [2/2]

template<typename T >
constexpr generic::Height<T> mir::geometry::as_height ( generic::Y< T > const &  y)
inlineconstexpr

◆ as_width() [1/2]

template<typename T >
constexpr generic::Width<T> mir::geometry::as_width ( generic::DeltaX< T > const &  dx)
inlineconstexpr

◆ as_width() [2/2]

template<typename T >
constexpr generic::Width<T> mir::geometry::as_width ( generic::X< T > const &  x)
inlineconstexpr

◆ as_x() [1/2]

template<typename T >
constexpr generic::X<T> mir::geometry::as_x ( generic::DeltaX< T > const &  dx)
inlineconstexpr

◆ as_x() [2/2]

template<typename T >
constexpr generic::X<T> mir::geometry::as_x ( generic::Width< T > const &  w)
inlineconstexpr

◆ as_y() [1/2]

template<typename T >
constexpr generic::Y<T> mir::geometry::as_y ( generic::DeltaY< T > const &  dy)
inlineconstexpr

◆ as_y() [2/2]

template<typename T >
constexpr generic::Y<T> mir::geometry::as_y ( generic::Height< T > const &  h)
inlineconstexpr

◆ operator<<()

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

Copyright © 2012-2022 Canonical Ltd.
Generated on Fri Aug 26 13:27:37 UTC 2022
This documentation is licensed under the GPL version 2 or 3.