Struct representing a 2D point.
More...
#include <Board/Point.h>
◆ Point() [1/3]
LibBoard::Point::Point |
( |
| ) |
|
|
inline |
◆ Point() [2/3]
LibBoard::Point::Point |
( |
const Point & |
other | ) |
|
|
inline |
Point constructor.
- Parameters
-
Definition at line 43 of file Point.h.
43:
x(other.x),
y(other.y) { }
◆ Point() [3/3]
LibBoard::Point::Point |
( |
double |
xc, |
|
|
double |
yc |
|
) |
| |
|
inline |
Point constructor.
- Parameters
-
xc | The point's first coordinate. |
yc | The point's second coordinate. |
Definition at line 58 of file Point.h.
◆ get()
void LibBoard::Point::get |
( |
double & |
xout, |
|
|
double & |
yout |
|
) |
| const |
|
inline |
◆ norm()
double LibBoard::Point::norm |
( |
| ) |
const |
|
inline |
◆ operator*=()
Point & LibBoard::Point::operator*= |
( |
double |
s | ) |
|
|
inline |
Definition at line 162 of file Point.h.
163{
164 x *= s;
165 y *= s;
166 return *this;
167}
◆ operator+=()
Point & LibBoard::Point::operator+= |
( |
const Point & |
other | ) |
|
|
inline |
Definition at line 146 of file Point.h.
147{
148 x += other.x;
149 y += other.y;
150 return *this;
151}
References x, and y.
◆ operator-()
Point LibBoard::Point::operator- |
( |
| ) |
|
|
inline |
◆ operator-=()
Point & LibBoard::Point::operator-= |
( |
const Point & |
other | ) |
|
|
inline |
Definition at line 154 of file Point.h.
155{
156 x -= other.x;
157 y -= other.y;
158 return *this;
159}
References x, and y.
◆ operator/=()
Point & LibBoard::Point::operator/= |
( |
double |
s | ) |
|
|
inline |
Definition at line 170 of file Point.h.
171{
172 x /= s;
173 y /= s;
174 return *this;
175}
◆ operator=()
Point & LibBoard::Point::operator= |
( |
const Point & |
other | ) |
|
|
default |
Default assignment operator.
- Parameters
-
◆ rotate() [1/2]
Point & LibBoard::Point::rotate |
( |
double |
angle | ) |
|
|
inline |
◆ rotate() [2/2]
Point & LibBoard::Point::rotate |
( |
double |
angle, |
|
|
const Point & |
center |
|
) |
| |
|
inline |
Definition at line 206 of file Point.h.
207{
209 (*this).rotate( angle );
211 return *this;
212}
Point center(const std::vector< Point > &points)
◆ rotated() [1/2]
Point LibBoard::Point::rotated |
( |
double |
angle | ) |
const |
|
inline |
Rotate the point with a given angle around the origin (0,0)
- Parameters
-
- Returns
- The rotated point.
Definition at line 200 of file Point.h.
201{
202 return Point(*this).rotate( angle );
203}
References Point().
Referenced by LibBoard::Ellipse::rotate().
◆ rotated() [2/2]
Point LibBoard::Point::rotated |
( |
double |
angle, |
|
|
const Point & |
center |
|
) |
| const |
|
inline |
Definition at line 215 of file Point.h.
216{
217 return Point(*this).rotate( angle, center );
218}
References Point().
double LibBoard::Point::x |
The point's first coordinate
Definition at line 29 of file Point.h.
Referenced by LibBoard::Ellipse::boundingBox(), LibBoard::Text::boundingBox(), LibBoard::Board::drawTriangle(), LibBoard::Board::fillGouraudTriangle(), LibBoard::Board::fillTriangle(), LibBoard::Ellipse::flushCairo(), LibBoard::Circle::flushCairo(), LibBoard::Arc::flushCairo(), LibBoard::Ellipse::flushFIG(), LibBoard::Text::flushFIG(), LibBoard::GouraudTriangle::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Arc::flushPostscript(), LibBoard::Text::flushPostscript(), LibBoard::GouraudTriangle::flushSVG(), LibBoard::Ellipse::flushSVG(), LibBoard::Circle::flushSVG(), LibBoard::Arc::flushSVG(), LibBoard::Text::flushSVG(), LibBoard::Ellipse::flushTikZ(), LibBoard::Circle::flushTikZ(), LibBoard::Arc::flushTikZ(), LibBoard::Text::flushTikZ(), get(), operator+=(), operator-=(), LibBoard::Ellipse::rotate(), LibBoard::Board::scale(), LibBoard::Path::scale(), LibBoard::ShapeList::scale(), LibBoard::Group::scale(), LibBoard::Line::scale(), LibBoard::Line::scaled(), and LibBoard::Arrow::scaled().
double LibBoard::Point::y |
The point's second coordinate
Definition at line 30 of file Point.h.
Referenced by LibBoard::Ellipse::boundingBox(), LibBoard::Text::boundingBox(), LibBoard::Board::drawTriangle(), LibBoard::Board::fillGouraudTriangle(), LibBoard::Board::fillTriangle(), LibBoard::Ellipse::flushCairo(), LibBoard::Circle::flushCairo(), LibBoard::Arc::flushCairo(), LibBoard::Ellipse::flushFIG(), LibBoard::Text::flushFIG(), LibBoard::GouraudTriangle::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Arc::flushPostscript(), LibBoard::Text::flushPostscript(), LibBoard::GouraudTriangle::flushSVG(), LibBoard::Ellipse::flushSVG(), LibBoard::Circle::flushSVG(), LibBoard::Arc::flushSVG(), LibBoard::Text::flushSVG(), LibBoard::Ellipse::flushTikZ(), LibBoard::Circle::flushTikZ(), LibBoard::Arc::flushTikZ(), LibBoard::Text::flushTikZ(), get(), operator+=(), operator-=(), LibBoard::Ellipse::rotate(), LibBoard::Board::scale(), LibBoard::Path::scale(), LibBoard::ShapeList::scale(), LibBoard::Group::scale(), LibBoard::Line::scale(), LibBoard::Line::scaled(), and LibBoard::Arrow::scaled().
The documentation for this struct was generated from the following file: