LibreOffice Module basegfx (master) 1
Public Member Functions | Static Public Member Functions | List of all members
basegfx::B2DPoint Class Reference

Base Point class with two double values. More...

#include <b2dpoint.hxx>

Inheritance diagram for basegfx::B2DPoint:
[legend]
Collaboration diagram for basegfx::B2DPoint:
[legend]

Public Member Functions

 B2DPoint ()
 Create a 2D Point. More...
 
 B2DPoint (double fX, double fY)
 Create a 2D Point. More...
 
 B2DPoint (const ::basegfx::B2IPoint &rPoint)
 Create a copy of a 2D Point. More...
 
 B2DPoint (Tuple2D< double > const &rTuple)
 constructor with tuple to allow copy-constructing from B2DTuple-based classes More...
 
 B2DPoint (Size2D< double > const &rSize)
 create a point from a size object More...
 
B2DPointoperator*= (const B2DPoint &rPnt)
 *=operator to allow usage from B2DPoint, too More...
 
B2DPointoperator*= (double t)
 *=operator to allow usage from B2DPoint, too More...
 
BASEGFX_DLLPUBLIC B2DPointoperator= (Tuple2D< double > &rPoint)
 assignment operator to allow assigning the results of B2DTuple calculations More...
 
BASEGFX_DLLPUBLIC B2DPointoperator*= (const ::basegfx::B2DHomMatrix &rMat)
 Transform point by given transformation matrix. More...
 
- Public Member Functions inherited from basegfx::B2DTuple
 B2DTuple ()
 Create a 2D Tuple. More...
 
 B2DTuple (double fX, double fY)
 Create a 2D Tuple. More...
 
 B2DTuple (Tuple2D< double > const &rTuple)
 
BASEGFX_DLLPUBLIC B2DTuple (const B2ITuple &rTup)
 Create a copy of a 2D integer Tuple. More...
 
B2DTuple operator- (void) const
 
- Public Member Functions inherited from basegfx::Tuple2D< double >
 Tuple2D (double x, double y)
 Create a 2D Tuple. More...
 
double get (Axis2D eAxis)
 
void set (Axis2D eAxis, double fValue)
 
double getX () const
 Get X-Coordinate of 2D Tuple. More...
 
double getY () const
 Get Y-Coordinate of 2D Tuple. More...
 
void setX (double fX)
 Set X-Coordinate of 2D Tuple. More...
 
void setY (double fY)
 Set Y-Coordinate of 2D Tuple. More...
 
void adjustX (double fX)
 Adjust X-Coordinate of 2D Tuple. More...
 
void adjustY (double fY)
 Adjust Y-Coordinate of 2D Tuple. More...
 
bool equal (const Tuple2D< double > &rTup) const
 
bool equal (const Tuple2D< double > &rTup) const
 
bool equalZero () const
 
bool equalZero () const
 
Tuple2D< double > & operator+= (const Tuple2D< double > &rTup)
 
Tuple2D< double > & operator-= (const Tuple2D< double > &rTup)
 
Tuple2D< double > & operator/= (const Tuple2D< double > &rTup)
 
Tuple2D< double > & operator/= (double t)
 
Tuple2D< double > & operator*= (const Tuple2D< double > &rTup)
 
Tuple2D< double > & operator*= (double t)
 
Tuple2D< double > operator- (void) const
 
bool operator== (const Tuple2D< double > &rTup) const
 
bool operator!= (const Tuple2D< double > &rTup) const
 

Static Public Member Functions

static const B2DPointgetEmptyPoint ()
 
- Static Public Member Functions inherited from basegfx::B2DTuple
static BASEGFX_DLLPUBLIC const B2DTuplegetEmptyTuple ()
 

Additional Inherited Members

- Public Attributes inherited from basegfx::Tuple2D< double >
double mnX
 
double mnY
 
double mfX
 
double mfY
 
- Protected Attributes inherited from basegfx::Tuple2D< double >
union {
   struct {
      TYPE   mnX
 
      TYPE   mnY
 
   } 
 
   struct {
      TYPE   mfX
 
      TYPE   mfY
 
   } 
 
}; 
 

Detailed Description

Base Point class with two double values.

This class derives all operators and common handling for a 2D data class from B2DTuple. All necessary extensions which are special for points will be added here.

See also
B2DTuple

Definition at line 41 of file b2dpoint.hxx.

Constructor & Destructor Documentation

◆ B2DPoint() [1/5]

basegfx::B2DPoint::B2DPoint ( )
inline

Create a 2D Point.

The point is initialized to (0.0, 0.0)

Definition at line 48 of file b2dpoint.hxx.

◆ B2DPoint() [2/5]

basegfx::B2DPoint::B2DPoint ( double  fX,
double  fY 
)
inline

Create a 2D Point.

Parameters
fXThis parameter is used to initialize the X-coordinate of the 2D Point.
fYThis parameter is used to initialize the Y-coordinate of the 2D Point.

Definition at line 61 of file b2dpoint.hxx.

◆ B2DPoint() [3/5]

basegfx::B2DPoint::B2DPoint ( const ::basegfx::B2IPoint rPoint)
inlineexplicit

Create a copy of a 2D Point.

Parameters
rPointThe 2D Point which will be copied.

Definition at line 70 of file b2dpoint.hxx.

◆ B2DPoint() [4/5]

basegfx::B2DPoint::B2DPoint ( Tuple2D< double > const &  rTuple)
inline

constructor with tuple to allow copy-constructing from B2DTuple-based classes

Definition at line 77 of file b2dpoint.hxx.

◆ B2DPoint() [5/5]

basegfx::B2DPoint::B2DPoint ( Size2D< double > const &  rSize)
inlineexplicit

create a point from a size object

Definition at line 82 of file b2dpoint.hxx.

Member Function Documentation

◆ getEmptyPoint()

static const B2DPoint & basegfx::B2DPoint::getEmptyPoint ( )
inlinestatic

Definition at line 121 of file b2dpoint.hxx.

References basegfx::B2DTuple::getEmptyTuple().

Referenced by ImplB3DPolygon::insert().

◆ operator*=() [1/3]

B2DPoint & basegfx::B2DPoint::operator*= ( const ::basegfx::B2DHomMatrix rMat)

Transform point by given transformation matrix.

The translational components of the matrix are, in contrast to B2DVector, applied.

Definition at line 26 of file b2dpoint.cxx.

References basegfx::Tuple2D< double >::mfX, and basegfx::Tuple2D< double >::mfY.

◆ operator*=() [2/3]

B2DPoint & basegfx::B2DPoint::operator*= ( const B2DPoint rPnt)
inline

*=operator to allow usage from B2DPoint, too

Definition at line 88 of file b2dpoint.hxx.

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

◆ operator*=() [3/3]

B2DPoint & basegfx::B2DPoint::operator*= ( double  t)
inline

*=operator to allow usage from B2DPoint, too

Definition at line 97 of file b2dpoint.hxx.

References mfX, mfY, and t.

◆ operator=()

BASEGFX_DLLPUBLIC B2DPoint & basegfx::B2DPoint::operator= ( Tuple2D< double > &  rPoint)
inline

assignment operator to allow assigning the results of B2DTuple calculations

Definition at line 107 of file b2dpoint.hxx.

References basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), mfX, and mfY.


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