Struct representing a 2D point.
More...
#include <Point.h>
LibBoard::Point::Point |
( |
| ) |
|
|
inline |
Point constructor.
- Parameters
-
x | The point's first coordinate. |
y | The point's second coordinate. |
Referenced by operator-(), and rotated().
LibBoard::Point::Point |
( |
const Point & |
other | ) |
|
|
inline |
Point constructor.
- Parameters
-
x | The point's first coordinate. |
y | The point's second coordinate. |
LibBoard::Point::Point |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inline |
Point constructor.
- Parameters
-
x | The point's first coordinate. |
y | The point's second coordinate. |
void LibBoard::Point::get |
( |
double & |
x, |
|
|
double & |
y |
|
) |
| const |
|
inline |
double LibBoard::Point::norm |
( |
| ) |
const |
|
inline |
Point & LibBoard::Point::operator*= |
( |
double |
s | ) |
|
|
inline |
Scale the point's coordinates.
- Parameters
-
- Returns
- The point itself, once scaled.
References x, and y.
Point & LibBoard::Point::operator+= |
( |
const Point & |
other | ) |
|
|
inline |
Move the point given a translation vector (given as another Point).
- Parameters
-
other | A point seen as a translation vector. |
- Returns
- The point itself, once translated.
References x, and y.
Point LibBoard::Point::operator- |
( |
| ) |
const |
|
inline |
Get the opposite copy of the point.
- Returns
- The opposite copy of the point.
References Point(), x, and y.
Point & LibBoard::Point::operator-= |
( |
const Point & |
other | ) |
|
|
inline |
Move (backward) the point given a translation vector (given as another Point).
- Parameters
-
other | A point seen as a translation vector. |
- Returns
- The point itself, once translated.
References x, and y.
Point & LibBoard::Point::operator/= |
( |
double |
s | ) |
|
|
inline |
Downscale the point's coordinates.
- Parameters
-
- Returns
- The point itself, once scaled.
References x, and y.
Point & LibBoard::Point::rotate |
( |
double |
angle | ) |
|
|
inline |
Point & LibBoard::Point::rotate |
( |
double |
angle, |
|
|
const Point & |
center |
|
) |
| |
|
inline |
Rotate the point, given a rotation center and an angle.
- Parameters
-
angle | The rotation angle (in radians). |
center | The rotation center. |
- Returns
- The point itself (once rotated).
References rotate().
Point LibBoard::Point::rotated |
( |
double |
angle | ) |
const |
|
inline |
Point LibBoard::Point::rotated |
( |
double |
angle, |
|
|
const Point & |
center |
|
) |
| const |
|
inline |
Get a rotated copy of the point, given a rotation center and an angle.
- Parameters
-
angle | The rotation angle (in radians). |
center | The rotation center. |
- Returns
- A rotated copy of the point.
References Point().
double LibBoard::Point::x |
The point's first coordinate
Referenced by LibBoard::ShapeList::addTiling(), LibBoard::ShapeList::append(), LibBoard::Ellipse::boundingBox(), LibBoard::Text::boundingBox(), LibBoard::Board::drawTriangle(), LibBoard::Board::fillGouraudTriangle(), LibBoard::Board::fillTriangle(), LibBoard::Ellipse::flushFIG(), LibBoard::Text::flushFIG(), LibBoard::GouraudTriangle::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Text::flushPostscript(), LibBoard::GouraudTriangle::flushSVG(), LibBoard::Ellipse::flushSVG(), LibBoard::Circle::flushSVG(), LibBoard::Text::flushSVG(), LibBoard::Ellipse::flushTikZ(), LibBoard::Circle::flushTikZ(), LibBoard::Text::flushTikZ(), get(), LibBoard::Board::makeGrid(), LibBoard::Shape::moveCenter(), norm(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), rotate(), LibBoard::Ellipse::rotate(), LibBoard::Text::rotate(), LibBoard::ShapeList::scale(), LibBoard::Board::scale(), LibBoard::Path::scale(), LibBoard::Group::scale(), LibBoard::Line::scale(), LibBoard::Line::scaled(), and LibBoard::Arrow::scaled().
double LibBoard::Point::y |
The point's second coordinate
Referenced by LibBoard::ShapeList::addTiling(), LibBoard::ShapeList::append(), LibBoard::Ellipse::boundingBox(), LibBoard::Text::boundingBox(), LibBoard::Board::drawTriangle(), LibBoard::Board::fillGouraudTriangle(), LibBoard::Board::fillTriangle(), LibBoard::Ellipse::flushFIG(), LibBoard::Text::flushFIG(), LibBoard::GouraudTriangle::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Text::flushPostscript(), LibBoard::GouraudTriangle::flushSVG(), LibBoard::Ellipse::flushSVG(), LibBoard::Circle::flushSVG(), LibBoard::Text::flushSVG(), LibBoard::Ellipse::flushTikZ(), LibBoard::Circle::flushTikZ(), LibBoard::Text::flushTikZ(), get(), LibBoard::Board::makeGrid(), LibBoard::Shape::moveCenter(), norm(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), rotate(), LibBoard::Ellipse::rotate(), LibBoard::Text::rotate(), LibBoard::ShapeList::scale(), LibBoard::Board::scale(), LibBoard::Path::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: