LibreOffice Module tools (master) 1
Public Member Functions | Friends | List of all members
Point Class Referencefinal

#include <gen.hxx>

Inheritance diagram for Point:
[legend]
Collaboration diagram for Point:
[legend]

Public Member Functions

constexpr Point ()
 
constexpr Point (tools::Long nX, tools::Long nY)
 
constexpr tools::Long X () const
 
constexpr tools::Long Y () const
 
void Move (tools::Long nHorzMove, tools::Long nVertMove)
 
void Move (Size const &s)
 
tools::Long AdjustX (tools::Long nHorzMove)
 
tools::Long AdjustY (tools::Long nVertMove)
 
void RotateAround (tools::Long &rX, tools::Long &rY, Degree10 nOrientation) const
 
void RotateAround (Point &, Degree10 nOrientation) const
 
Pointoperator+= (const Point &rPoint)
 
Pointoperator-= (const Point &rPoint)
 
Pointoperator*= (const tools::Long nVal)
 
Pointoperator/= (const tools::Long nVal)
 
constexpr tools::Long getX () const
 
constexpr tools::Long getY () const
 
void setX (tools::Long nX)
 
void setY (tools::Long nY)
 
Pair const & toPair () const
 
PairtoPair ()
 
constexpr Point scale (sal_Int64 nMulX, sal_Int64 nDivX, sal_Int64 nMulY, sal_Int64 nDivY) const
 
TOOLS_DLLPUBLIC rtl::OString toString () const
 
TOOLS_DLLPUBLIC size_t GetHashValue () const
 

Friends

Point operator+ (const Point &rVal1, const Point &rVal2)
 
Point operator- (const Point &rVal1, const Point &rVal2)
 
Point operator* (const Point &rVal1, const tools::Long nVal2)
 
Point operator/ (const Point &rVal1, const tools::Long nVal2)
 

Additional Inherited Members

- Protected Member Functions inherited from Pair
constexpr Pair ()
 
constexpr Pair (tools::Long nA, tools::Long nB)
 
tools::Long A () const
 
tools::Long B () const
 
tools::LongA ()
 
tools::LongB ()
 
TOOLS_DLLPUBLIC rtl::OString toString () const
 
TOOLS_DLLPUBLIC size_t GetHashValue () const
 
- Protected Attributes inherited from Pair
tools::Long mnA
 
tools::Long mnB
 

Detailed Description

Definition at line 77 of file gen.hxx.

Constructor & Destructor Documentation

◆ Point() [1/2]

constexpr Point::Point ( )
inlineconstexpr

Definition at line 80 of file gen.hxx.

Referenced by scale().

◆ Point() [2/2]

constexpr Point::Point ( tools::Long  nX,
tools::Long  nY 
)
inlineconstexpr

Definition at line 81 of file gen.hxx.

Member Function Documentation

◆ AdjustX()

tools::Long Point::AdjustX ( tools::Long  nHorzMove)
inline

Definition at line 88 of file gen.hxx.

Referenced by Move(), and tools::Polygon::Move().

◆ AdjustY()

tools::Long Point::AdjustY ( tools::Long  nVertMove)
inline

Definition at line 89 of file gen.hxx.

Referenced by Move(), and tools::Polygon::Move().

◆ GetHashValue()

size_t Pair::GetHashValue ( ) const

Definition at line 57 of file gen.cxx.

◆ getX()

constexpr tools::Long Point::getX ( ) const
inlineconstexpr

Definition at line 105 of file gen.hxx.

References X.

Referenced by scale(), and tools::GenericTypeSerializer::writePoint().

◆ getY()

constexpr tools::Long Point::getY ( ) const
inlineconstexpr

Definition at line 106 of file gen.hxx.

References Y.

Referenced by scale(), and tools::GenericTypeSerializer::writePoint().

◆ Move() [1/2]

void Point::Move ( Size const &  s)
inline

Definition at line 340 of file gen.hxx.

References AdjustX(), AdjustY(), Size::Height(), and Size::Width().

◆ Move() [2/2]

void Point::Move ( tools::Long  nHorzMove,
tools::Long  nVertMove 
)
inline

Definition at line 121 of file gen.hxx.

References Pair::mnA, and Pair::mnB.

◆ operator*=()

Point & Point::operator*= ( const tools::Long  nVal)
inline

Definition at line 141 of file gen.hxx.

References Pair::mnA, and Pair::mnB.

◆ operator+=()

Point & Point::operator+= ( const Point rPoint)
inline

Definition at line 127 of file gen.hxx.

References Pair::mnA, and Pair::mnB.

◆ operator-=()

Point & Point::operator-= ( const Point rPoint)
inline

Definition at line 134 of file gen.hxx.

References Pair::mnA, and Pair::mnB.

◆ operator/=()

Point & Point::operator/= ( const tools::Long  nVal)
inline

Definition at line 148 of file gen.hxx.

References Pair::mnA, and Pair::mnB.

◆ RotateAround() [1/2]

void Point::RotateAround ( Point rPoint,
Degree10  nOrientation 
) const

Definition at line 22 of file point.cxx.

References RotateAround(), setX(), setY(), X(), and Y().

◆ RotateAround() [2/2]

void Point::RotateAround ( tools::Long rX,
tools::Long rY,
Degree10  nOrientation 
) const

Definition at line 32 of file point.cxx.

References toRadians(), X(), and Y().

Referenced by RotateAround().

◆ scale()

constexpr Point Point::scale ( sal_Int64  nMulX,
sal_Int64  nDivX,
sal_Int64  nMulY,
sal_Int64  nDivY 
) const
inlineconstexpr

Definition at line 185 of file gen.hxx.

References o3tl::convert(), getX(), getY(), and Point().

Referenced by o3tl::convert().

◆ setX()

void Point::setX ( tools::Long  nX)
inline

◆ setY()

void Point::setY ( tools::Long  nY)
inline

◆ toPair() [1/2]

Pair & Point::toPair ( )
inline

Definition at line 111 of file gen.hxx.

◆ toPair() [2/2]

Pair const & Point::toPair ( ) const
inline

Definition at line 110 of file gen.hxx.

Referenced by operator==().

◆ toString()

OString Pair::toString ( ) const

Definition at line 54 of file gen.cxx.

◆ X()

constexpr tools::Long Point::X ( ) const
inlineconstexpr

◆ Y()

constexpr tools::Long Point::Y ( ) const
inlineconstexpr

Friends And Related Function Documentation

◆ operator*

Point operator* ( const Point rVal1,
const tools::Long  nVal2 
)
friend

Definition at line 165 of file gen.hxx.

◆ operator+

Point operator+ ( const Point rVal1,
const Point rVal2 
)
friend

Definition at line 155 of file gen.hxx.

◆ operator-

Point operator- ( const Point rVal1,
const Point rVal2 
)
friend

Definition at line 160 of file gen.hxx.

◆ operator/

Point operator/ ( const Point rVal1,
const tools::Long  nVal2 
)
friend

Definition at line 170 of file gen.hxx.


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