LibBoard::Circle Struct Reference

A circle. More...

#include <Shapes.h>

Inheritance diagram for LibBoard::Circle:
LibBoard::Ellipse LibBoard::Shape

List of all members.

Public Member Functions

 Circle (double x, double y, double radius, Color penColor, Color fillColor, double lineWidth, const LineStyle style=SolidStyle, int depth=-1)
const std::string & name () const
Point center () const
Circlerotate (double angle, const Point &center)
Circle rotated (double angle, const Point &center) const
Circlerotate (double angle)
Circle rotated (double angle) const
Circletranslate (double dx, double dy)
Circle translated (double dx, double dy) const
Shapescale (double sx, double sy)
Shapescale (double s)
Circle scaled (double sx, double sy) const
Circle scaled (double s) const
void scaleAll (double s)
void flushSVG (std::ostream &stream, const TransformSVG &transform) const
Circleclone () const

Detailed Description

A circle.

The circle structure.

Examples:

examples/clipping.cpp, examples/example4.cpp, and examples/graph.cpp.


Member Function Documentation

Point LibBoard::Circle::center (  )  const [virtual]

Returns the gravity center of the shape.

Returns:
The center of the shape.

Reimplemented from LibBoard::Ellipse.

Circle * LibBoard::Circle::clone (  )  const [virtual]

Return a copy of the shape.

Returns:

Reimplemented from LibBoard::Ellipse.

void LibBoard::Circle::flushSVG ( std::ostream &  stream,
const TransformSVG transform 
) const [virtual]

Writes the SVG code of the shape in a stream according to a transform.

Parameters:
stream The output stream.
transform A 2D transform to be applied.

Reimplemented from LibBoard::Ellipse.

References LibBoard::Shape::svgProperties(), LibBoard::Point::x, and LibBoard::Point::y.

const std::string & LibBoard::Circle::name (  )  const [virtual]

Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)

Returns:

Reimplemented from LibBoard::Ellipse.

Circle & LibBoard::Circle::rotate ( double  angle  )  [virtual]

Rotate the shape around its center.

Parameters:
angle The rotation angle in radian.
Returns:
A reference to the shape itself.

Reimplemented from LibBoard::Ellipse.

References rotate().

Circle & LibBoard::Circle::rotate ( double  angle,
const Point center 
) [virtual]

Rotate the shape around a given center of rotation.

Parameters:
angle The rotation angle in radian.
center The center of rotation.
Returns:
A reference to the shape itself.

Reimplemented from LibBoard::Ellipse.

References LibBoard::Point::rotate().

Referenced by rotate(), and rotated().

Circle LibBoard::Circle::rotated ( double  angle  )  const
Parameters:
angle 
Returns:

Reimplemented from LibBoard::Ellipse.

References rotate().

Circle LibBoard::Circle::rotated ( double  angle,
const Point center 
) const
Parameters:
angle 
center 
Returns:

Reimplemented from LibBoard::Ellipse.

References rotate().

Shape & LibBoard::Circle::scale ( double  s  )  [virtual]

Scale the shape along both axis.

Parameters:
s The scale factor along both axis.
Returns:
The shape itself.

Reimplemented from LibBoard::Ellipse.

References scale().

Shape & LibBoard::Circle::scale ( double  sx,
double  sy 
) [virtual]

Scale the shape along the x an y axis.

Parameters:
sx The scale factor along the x axis.
sy The scale factor along the y axis.
Returns:
The shape itself.

Reimplemented from LibBoard::Ellipse.

Examples:
examples/example4.cpp.

Referenced by scale().

void LibBoard::Circle::scaleAll ( double  s  )  [virtual]

Scales all the values (positions, dimensions, etc.) associated with the shape.

Parameters:
s The scaling factor.

Reimplemented from LibBoard::Ellipse.

Circle LibBoard::Circle::scaled ( double  sx,
double  sy 
) const
Parameters:
sx 
sy 
Returns:

Reimplemented from LibBoard::Ellipse.

Circle & LibBoard::Circle::translate ( double  dx,
double  dy 
) [virtual]

Translate the shape by a given offset.

Parameters:
dx The x offset.
dy The y offset.
Returns:
A reference to the shape itself.

Reimplemented from LibBoard::Ellipse.

Referenced by translated().

Circle LibBoard::Circle::translated ( double  dx,
double  dy 
) const
Parameters:
dx 
dy 
Returns:

Reimplemented from LibBoard::Ellipse.

References translate().


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