LibBoard::Point Struct Reference

Struct representing a 2D point. More...

#include <Point.h>

List of all members.

Public Member Functions

 Point ()
 Point (const Point &other)
 Point (double x, double y)
Pointrotate (double angle)
void get (double &x, double &y) const
Point rotated (double angle) const
Pointrotate (double angle, const Point &center)
Pointrotated (double angle, const Point &center) const
Pointoperator+= (const Point &other)
Pointoperator-= (const Point &other)
Pointoperator*= (double s)
Pointoperator/= (double s)
Point operator- ()
double norm () const

Public Attributes

double x
double y

Detailed Description

Struct representing a 2D point.

The Point structure.

Examples:

examples/clipping.cpp, examples/example1.cpp, examples/example2.cpp, examples/koch.cpp, and examples/logo.cpp.


Constructor & Destructor Documentation

LibBoard::Point::Point (  )  [inline]

Point constructor.

Parameters:
x The point's first coordinate.
y The point's second coordinate.

Referenced by 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.

Member Function Documentation

void LibBoard::Point::get ( double &  x,
double &  y 
) const [inline]

Get the values of the x and y values.

Parameters:
x Reference to the x to be set.
y Reference to the y to be set.

References x, and y.

Point & LibBoard::Point::rotate ( double  angle  )  [inline]

Rotate the point with a given angle around the origin (0,0)

Parameters:
angle The rotation angle.

References x, and y.

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)

Parameters:
angle The rotation angle.
Returns:
The rotated point.
Examples:
examples/koch.cpp.

References Point().

Referenced by LibBoard::Ellipse::rotate().


Member Data Documentation


The documentation for this struct was generated from the following file:
Generated on Fri Jul 16 09:07:38 2010 for Board by  doxygen 1.6.3