Struct representing a 2D point. More...
#include <Point.h>
Public Member Functions | |
Point () | |
Point (const Point &other) | |
Point (double x, double y) | |
Point & | rotate (double angle) |
void | get (double &x, double &y) const |
Point | rotated (double angle) const |
Point & | rotate (double angle, const Point ¢er) |
Point & | rotated (double angle, const Point ¢er) const |
Point & | operator+= (const Point &other) |
Point & | operator-= (const Point &other) |
Point & | operator*= (double s) |
Point & | operator/= (double s) |
Point | operator- () |
double | norm () const |
Public Attributes | |
double | x |
double | y |
Struct representing a 2D point.
The Point structure.
examples/clipping.cpp, examples/example1.cpp, examples/example2.cpp, examples/koch.cpp, and examples/logo.cpp.
LibBoard::Point::Point | ( | ) | [inline] |
LibBoard::Point::Point | ( | const Point & | other | ) | [inline] |
Point constructor.
x | The point's first coordinate. | |
y | The point's second coordinate. |
LibBoard::Point::Point | ( | double | x, | |
double | y | |||
) | [inline] |
Point constructor.
x | The point's first coordinate. | |
y | The point's second coordinate. |
void LibBoard::Point::get | ( | double & | x, | |
double & | y | |||
) | const [inline] |
Point & LibBoard::Point::rotate | ( | double | angle | ) | [inline] |
Rotate the point with a given angle around the origin (0,0)
angle | The rotation angle. |
Referenced by LibBoard::Text::rotate(), and LibBoard::Circle::rotate().
Point LibBoard::Point::rotated | ( | double | angle | ) | const [inline] |
Rotate the point with a given angle around the origin (0,0)
angle | The rotation angle. |
References Point().
Referenced by LibBoard::Ellipse::rotate().
double LibBoard::Point::x |
The point's first coordinate
Referenced by LibBoard::Text::boundingBox(), LibBoard::Ellipse::boundingBox(), LibBoard::Board::drawTriangle(), LibBoard::Board::fillGouraudTriangle(), LibBoard::Board::fillTriangle(), LibBoard::Text::flushFIG(), LibBoard::Ellipse::flushFIG(), LibBoard::Text::flushPostscript(), LibBoard::GouraudTriangle::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Text::flushSVG(), LibBoard::GouraudTriangle::flushSVG(), LibBoard::Circle::flushSVG(), LibBoard::Ellipse::flushSVG(), get(), LibBoard::Text::rotate(), LibBoard::Ellipse::rotate(), rotate(), LibBoard::Line::scale(), LibBoard::Group::scale(), LibBoard::ShapeList::scale(), LibBoard::Path::scale(), LibBoard::Board::scale(), LibBoard::Arrow::scaled(), and LibBoard::Line::scaled().
double LibBoard::Point::y |
The point's second coordinate
Referenced by LibBoard::Text::boundingBox(), LibBoard::Ellipse::boundingBox(), LibBoard::Board::drawTriangle(), LibBoard::Board::fillGouraudTriangle(), LibBoard::Board::fillTriangle(), LibBoard::Text::flushFIG(), LibBoard::Ellipse::flushFIG(), LibBoard::Text::flushPostscript(), LibBoard::GouraudTriangle::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Text::flushSVG(), LibBoard::GouraudTriangle::flushSVG(), LibBoard::Circle::flushSVG(), LibBoard::Ellipse::flushSVG(), get(), LibBoard::Text::rotate(), LibBoard::Ellipse::rotate(), rotate(), LibBoard::Line::scale(), LibBoard::Group::scale(), LibBoard::ShapeList::scale(), LibBoard::Path::scale(), LibBoard::Board::scale(), LibBoard::Arrow::scaled(), and LibBoard::Line::scaled().