LibreOffice Module tools (master) 1
Public Member Functions | Private Attributes | List of all members
tools::Line Class Reference

#include <line.hxx>

Collaboration diagram for tools::Line:
[legend]

Public Member Functions

 Line (const Point &rStartPt, const Point &rEndPt)
 
void SetStart (const Point &rStartPt)
 
const PointGetStart () const
 
void SetEnd (const Point &rEndPt)
 
const PointGetEnd () const
 
double GetLength () const
 
bool Intersection (const tools::Line &rLine, double &rIntersectionX, double &rIntersectionY) const
 
bool Intersection (const tools::Line &rLine, Point &rIntersection) const
 
double GetDistance (const double &rPtX, const double &rPtY) const
 
double GetDistance (const Point &rPoint) const
 

Private Attributes

Point maStart
 
Point maEnd
 

Detailed Description

Definition at line 28 of file line.hxx.

Constructor & Destructor Documentation

◆ Line()

tools::Line::Line ( const Point rStartPt,
const Point rEndPt 
)
inline

Definition at line 35 of file line.hxx.

References maEnd, and maStart.

Member Function Documentation

◆ GetDistance() [1/2]

double Line::GetDistance ( const double &  rPtX,
const double &  rPtY 
) const

Definition at line 101 of file line.cxx.

References maEnd, maStart, Point::X(), and Point::Y().

◆ GetDistance() [2/2]

double tools::Line::GetDistance ( const Point rPoint) const
inline

Definition at line 49 of file line.hxx.

References GetDistance(), Point::X(), and Point::Y().

Referenced by GetDistance().

◆ GetEnd()

const Point & tools::Line::GetEnd ( ) const
inline

Definition at line 41 of file line.hxx.

References maEnd.

◆ GetLength()

double Line::GetLength ( ) const

Definition at line 28 of file line.cxx.

References maEnd, maStart, Point::X(), and Point::Y().

◆ GetStart()

const Point & tools::Line::GetStart ( ) const
inline

Definition at line 38 of file line.hxx.

References maStart.

◆ Intersection() [1/2]

bool Line::Intersection ( const tools::Line rLine,
double &  rIntersectionX,
double &  rIntersectionY 
) const

Definition at line 50 of file line.cxx.

References maEnd, maStart, Point::X(), and Point::Y().

Referenced by tools::Polygon::Contains(), and Intersection().

◆ Intersection() [2/2]

bool Line::Intersection ( const tools::Line rLine,
Point rIntersection 
) const

Definition at line 33 of file line.cxx.

References FRound(), Intersection(), Point::setX(), and Point::setY().

◆ SetEnd()

void tools::Line::SetEnd ( const Point rEndPt)
inline

Definition at line 40 of file line.hxx.

References maEnd.

◆ SetStart()

void tools::Line::SetStart ( const Point rStartPt)
inline

Definition at line 37 of file line.hxx.

References maStart.

Member Data Documentation

◆ maEnd

Point tools::Line::maEnd
private

Definition at line 32 of file line.hxx.

Referenced by GetDistance(), GetLength(), and Intersection().

◆ maStart

Point tools::Line::maStart
private

Definition at line 31 of file line.hxx.

Referenced by GetDistance(), GetLength(), and Intersection().


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