LibreOffice Module basegfx (master) 1
Public Member Functions | Protected Attributes | List of all members
basegfx::Tuple2D< TYPE > Class Template Reference

#include <Tuple2D.hxx>

Inheritance diagram for basegfx::Tuple2D< TYPE >:
[legend]

Public Member Functions

 Tuple2D (TYPE x, TYPE y)
 Create a 2D Tuple. More...
 
double get (Axis2D eAxis)
 
void set (Axis2D eAxis, TYPE fValue)
 
TYPE getX () const
 Get X-Coordinate of 2D Tuple. More...
 
TYPE getY () const
 Get Y-Coordinate of 2D Tuple. More...
 
void setX (TYPE fX)
 Set X-Coordinate of 2D Tuple. More...
 
void setY (TYPE fY)
 Set Y-Coordinate of 2D Tuple. More...
 
void adjustX (TYPE fX)
 Adjust X-Coordinate of 2D Tuple. More...
 
void adjustY (TYPE fY)
 Adjust Y-Coordinate of 2D Tuple. More...
 
template<typename T = TYPE, std::enable_if_t< std::is_integral_v< T >, int > = 0>
bool equal (const Tuple2D< TYPE > &rTup) const
 
template<typename T = TYPE, std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool equal (const Tuple2D< TYPE > &rTup) const
 
template<typename T = TYPE, std::enable_if_t< std::is_integral_v< T >, int > = 0>
bool equalZero () const
 
template<typename T = TYPE, std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool equalZero () const
 
Tuple2D< TYPE > & operator+= (const Tuple2D< TYPE > &rTup)
 
Tuple2D< TYPE > & operator-= (const Tuple2D< TYPE > &rTup)
 
Tuple2D< TYPE > & operator/= (const Tuple2D< TYPE > &rTup)
 
Tuple2D< TYPE > & operator*= (const Tuple2D< TYPE > &rTup)
 
Tuple2D< TYPE > & operator*= (TYPE t)
 
Tuple2D< TYPE > & operator/= (TYPE t)
 
Tuple2D< TYPE > operator- (void) const
 
bool operator== (const Tuple2D< TYPE > &rTup) const
 
bool operator!= (const Tuple2D< TYPE > &rTup) const
 

Protected Attributes

union {
   struct {
      TYPE   mnX
 
      TYPE   mnY
 
   } 
 
   struct {
      TYPE   mfX
 
      TYPE   mfY
 
   } 
 
}; 
 

Detailed Description

template<typename TYPE>
class basegfx::Tuple2D< TYPE >

Definition at line 18 of file Tuple2D.hxx.

Constructor & Destructor Documentation

◆ Tuple2D()

template<typename TYPE >
basegfx::Tuple2D< TYPE >::Tuple2D ( TYPE  x,
TYPE  y 
)
inline

Create a 2D Tuple.

@param nX
This parameter is used to initialize the X-coordinate
of the 2D Tuple.

@param nY
This parameter is used to initialize the Y-coordinate
of the 2D Tuple.

Definition at line 46 of file Tuple2D.hxx.

References x, and y.

Member Function Documentation

◆ adjustX()

template<typename TYPE >
void basegfx::Tuple2D< TYPE >::adjustX ( TYPE  fX)
inline

Adjust X-Coordinate of 2D Tuple.

Definition at line 75 of file Tuple2D.hxx.

References basegfx::Tuple2D< TYPE >::mnX.

◆ adjustY()

template<typename TYPE >
void basegfx::Tuple2D< TYPE >::adjustY ( TYPE  fY)
inline

Adjust Y-Coordinate of 2D Tuple.

Definition at line 78 of file Tuple2D.hxx.

References basegfx::Tuple2D< TYPE >::mnY.

◆ equal() [1/2]

template<typename TYPE >
template<typename T = TYPE, std::enable_if_t< std::is_integral_v< T >, int > = 0>
bool basegfx::Tuple2D< TYPE >::equal ( const Tuple2D< TYPE > &  rTup) const
inline

◆ equal() [2/2]

template<typename TYPE >
template<typename T = TYPE, std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::Tuple2D< TYPE >::equal ( const Tuple2D< TYPE > &  rTup) const
inline

◆ equalZero() [1/2]

template<typename TYPE >
template<typename T = TYPE, std::enable_if_t< std::is_integral_v< T >, int > = 0>
bool basegfx::Tuple2D< TYPE >::equalZero ( ) const
inline

◆ equalZero() [2/2]

template<typename TYPE >
template<typename T = TYPE, std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::Tuple2D< TYPE >::equalZero ( ) const
inline

◆ get()

template<typename TYPE >
double basegfx::Tuple2D< TYPE >::get ( Axis2D  eAxis)
inline

◆ getX()

template<typename TYPE >
TYPE basegfx::Tuple2D< TYPE >::getX ( ) const
inline

Get X-Coordinate of 2D Tuple.

Definition at line 63 of file Tuple2D.hxx.

References basegfx::Tuple2D< TYPE >::mnX, and TYPE.

Referenced by basegfx::absolute(), basegfx::InterpolatorProvider3D::addInverseTextureInterpolator(), basegfx::InterpolatorProvider3D::addTextureInterpolator(), basegfx::B2DVector::angle(), basegfx::B2DPolygon::appendQuadraticBezierSegment(), basegfx::utils::applyDefaultTextureCoordinatesSphere(), basegfx::areParallel(), basegfx::average(), basegfx::utils::B2DPolygonToUnoPointSequence(), basegfx::utils::B2DPolygonToUnoPolygonBezierCoords(), basegfx::Range2D< TYPE, TRAITS >::clamp(), basegfx::utils::clipPolygonOnParallelAxis(), basegfx::utils::createAreaGeometryForLineStartEnd(), basegfx::utils::createB3DPolygonFromB2DPolygon(), basegfx::utils::createCoordinateSystemTransform(), basegfx::utils::createLineTrapezoidFromEdge(), basegfx::utils::createPolygonFromEllipse(), basegfx::utils::createPolygonFromEllipseSegment(), basegfx::utils::createPolygonFromRect(), basegfx::utils::createPolygonFromUnitEllipseSegment(), basegfx::utils::createRotateAroundPoint(), basegfx::utils::createScaleB2DHomMatrix(), basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix(), basegfx::utils::createScaleTranslateB2DHomMatrix(), basegfx::utils::createShearXRotateTranslateB2DHomMatrix(), basegfx::utils::createTranslateB2DHomMatrix(), basegfx::createWaveLinePolygon(), basegfx::B2DVector::cross(), basegfx::B2DHomMatrix::decompose(), basegfx::utils::distort(), basegfx::B2IBox::expand(), basegfx::Range2D< TYPE, TRAITS >::expand(), basegfx::utils::exportToSvgD(), basegfx::utils::exportToSvgPoints(), basegfx::utils::findCut(), basegfx::B2DCubicBezier::fround(), basegfx::fround(), basegfx::Tuple2D< TYPE >::get(), basegfx::B2DCubicBezier::getAllExtremumPositions(), basegfx::unotools::UnoPolyPolygon::getBezierSegment(), basegfx::getContinuity(), basegfx::utils::getEllipticalGradientAlpha(), basegfx::getNormalizedPerpendicular(), basegfx::getOrientation(), basegfx::getPerpendicular(), basegfx::utils::getRadialGradientAlpha(), basegfx::utils::getRectangularGradientAlpha(), basegfx::utils::getSignedArea(), basegfx::B2DCubicBezier::getSmallestDistancePointToBezierSegment(), basegfx::utils::getSmallestDistancePointToEdge(), basegfx::utils::getSquareGradientAlpha(), basegfx::Size2D< TYPE >::getWidth(), basegfx::Range2D< TYPE, TRAITS >::grow(), basegfx::utils::importFromSvgD(), basegfx::initEllipticalGradientInfo(), basegfx::initRectGradientInfo(), basegfx::interpolate(), basegfx::utils::isInEpsilonRange(), basegfx::utils::isInside(), basegfx::B2IBox::isInside(), basegfx::Range2D< TYPE, TRAITS >::isInside(), basegfx::utils::isPointOnEdge(), basegfx::utils::isPointOnLine(), basegfx::utils::isRectangle(), basegfx::B2DPoint::operator=(), basegfx::B2DVector::operator=(), basegfx::B2DHomMatrix::scale(), basegfx::utils::scissorLineSegment(), basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(), basegfx::B2DCubicBezier::testAndSolveTrivialBezier(), and basegfx::B2DHomMatrix::translate().

◆ getY()

template<typename TYPE >
TYPE basegfx::Tuple2D< TYPE >::getY ( ) const
inline

Get Y-Coordinate of 2D Tuple.

Definition at line 66 of file Tuple2D.hxx.

References basegfx::Tuple2D< TYPE >::mnY, and TYPE.

Referenced by basegfx::absolute(), basegfx::InterpolatorProvider3D::addInverseTextureInterpolator(), basegfx::InterpolatorProvider3D::addTextureInterpolator(), basegfx::B2DVector::angle(), basegfx::B2DPolygon::appendQuadraticBezierSegment(), basegfx::utils::applyDefaultTextureCoordinatesSphere(), basegfx::areParallel(), basegfx::average(), basegfx::utils::B2DPolygonToUnoPointSequence(), basegfx::utils::B2DPolygonToUnoPolygonBezierCoords(), basegfx::Range2D< TYPE, TRAITS >::clamp(), basegfx::utils::clipPolygonOnParallelAxis(), basegfx::utils::createAreaGeometryForLineStartEnd(), basegfx::utils::createB3DPolygonFromB2DPolygon(), basegfx::utils::createCoordinateSystemTransform(), basegfx::utils::createLineTrapezoidFromEdge(), basegfx::utils::createPolygonFromEllipse(), basegfx::utils::createPolygonFromEllipseSegment(), basegfx::utils::createPolygonFromUnitEllipseSegment(), basegfx::utils::createRotateAroundPoint(), basegfx::utils::createScaleB2DHomMatrix(), basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix(), basegfx::utils::createScaleTranslateB2DHomMatrix(), basegfx::utils::createShearXRotateTranslateB2DHomMatrix(), basegfx::utils::createTranslateB2DHomMatrix(), basegfx::B2DVector::cross(), basegfx::B2DHomMatrix::decompose(), basegfx::utils::distort(), basegfx::B2IBox::expand(), basegfx::Range2D< TYPE, TRAITS >::expand(), basegfx::utils::exportToSvgD(), basegfx::utils::exportToSvgPoints(), basegfx::utils::findCut(), basegfx::B2DCubicBezier::fround(), basegfx::fround(), basegfx::Tuple2D< TYPE >::get(), basegfx::B2DCubicBezier::getAllExtremumPositions(), basegfx::utils::getAxialGradientAlpha(), basegfx::unotools::UnoPolyPolygon::getBezierSegment(), basegfx::getContinuity(), basegfx::utils::getEllipticalGradientAlpha(), basegfx::Size2D< TYPE >::getHeight(), basegfx::utils::getLinearGradientAlpha(), basegfx::getNormalizedPerpendicular(), basegfx::getOrientation(), basegfx::getPerpendicular(), basegfx::utils::getRadialGradientAlpha(), basegfx::utils::getRectangularGradientAlpha(), basegfx::utils::getSignedArea(), basegfx::B2DCubicBezier::getSmallestDistancePointToBezierSegment(), basegfx::utils::getSmallestDistancePointToEdge(), basegfx::utils::getSquareGradientAlpha(), basegfx::Range2D< TYPE, TRAITS >::grow(), basegfx::utils::importFromSvgD(), basegfx::initEllipticalGradientInfo(), basegfx::initRectGradientInfo(), basegfx::interpolate(), basegfx::utils::isInEpsilonRange(), basegfx::utils::isInside(), basegfx::B2IBox::isInside(), basegfx::Range2D< TYPE, TRAITS >::isInside(), basegfx::utils::isPointOnEdge(), basegfx::utils::isPointOnLine(), basegfx::utils::isRectangle(), basegfx::B2DPoint::operator=(), basegfx::B2DVector::operator=(), basegfx::B2DHomMatrix::scale(), basegfx::utils::scissorLineSegment(), basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(), basegfx::B2DCubicBezier::testAndSolveTrivialBezier(), and basegfx::B2DHomMatrix::translate().

◆ operator!=()

template<typename TYPE >
bool basegfx::Tuple2D< TYPE >::operator!= ( const Tuple2D< TYPE > &  rTup) const
inline

Definition at line 154 of file Tuple2D.hxx.

Referenced by basegfx::Size2D< TYPE >::operator!=().

◆ operator*=() [1/2]

template<typename TYPE >
Tuple2D< TYPE > & basegfx::Tuple2D< TYPE >::operator*= ( const Tuple2D< TYPE > &  rTup)
inline

◆ operator*=() [2/2]

template<typename TYPE >
Tuple2D< TYPE > & basegfx::Tuple2D< TYPE >::operator*= ( TYPE  t)
inline

Definition at line 136 of file Tuple2D.hxx.

References basegfx::Tuple2D< TYPE >::mfX, basegfx::Tuple2D< TYPE >::mfY, and t.

◆ operator+=()

template<typename TYPE >
Tuple2D< TYPE > & basegfx::Tuple2D< TYPE >::operator+= ( const Tuple2D< TYPE > &  rTup)
inline

◆ operator-()

template<typename TYPE >
Tuple2D< TYPE > basegfx::Tuple2D< TYPE >::operator- ( void  ) const
inline

◆ operator-=()

template<typename TYPE >
Tuple2D< TYPE > & basegfx::Tuple2D< TYPE >::operator-= ( const Tuple2D< TYPE > &  rTup)
inline

◆ operator/=() [1/2]

template<typename TYPE >
Tuple2D< TYPE > & basegfx::Tuple2D< TYPE >::operator/= ( const Tuple2D< TYPE > &  rTup)
inline

◆ operator/=() [2/2]

template<typename TYPE >
Tuple2D< TYPE > & basegfx::Tuple2D< TYPE >::operator/= ( TYPE  t)
inline

Definition at line 143 of file Tuple2D.hxx.

References basegfx::Tuple2D< TYPE >::mfX, basegfx::Tuple2D< TYPE >::mfY, and t.

◆ operator==()

template<typename TYPE >
bool basegfx::Tuple2D< TYPE >::operator== ( const Tuple2D< TYPE > &  rTup) const
inline

◆ set()

template<typename TYPE >
void basegfx::Tuple2D< TYPE >::set ( Axis2D  eAxis,
TYPE  fValue 
)
inline

◆ setX()

template<typename TYPE >
void basegfx::Tuple2D< TYPE >::setX ( TYPE  fX)
inline

◆ setY()

template<typename TYPE >
void basegfx::Tuple2D< TYPE >::setY ( TYPE  fY)
inline

Member Data Documentation

◆ 

union { ... } basegfx::Tuple2D< TYPE >::@5

◆ mfX

template<typename TYPE >
TYPE basegfx::Tuple2D< TYPE >::mfX

◆ mfY

template<typename TYPE >
TYPE basegfx::Tuple2D< TYPE >::mfY

◆ mnX

template<typename TYPE >
TYPE basegfx::Tuple2D< TYPE >::mnX

◆ mnY

template<typename TYPE >
TYPE basegfx::Tuple2D< TYPE >::mnY

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