Board  0.6.devel
 All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Macros
LibBoard::Circle Struct Reference

#include <Shapes.h>

Inheritance diagram for LibBoard::Circle:
Collaboration diagram for LibBoard::Circle:

Public Member Functions

 Circle (double x, double y, double radius, DGtal::Color pen, DGtal::Color fill, double lineWidth, const LineStyle style=SolidStyle, int depthValue=-1)
const std::string & name () const
Point center () const
Circle & rotate (double angle, const Point &center)
Circle rotated (double angle, const Point &center) const
Circle & rotate (double angle)
Circle rotated (double angle) const
Circle & translate (double dx, double dy)
Circle translated (double dx, double dy) const
Shape & scale (double sx, double sy)
Shape & scale (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
void flushTikZ (std::ostream &stream, const TransformTikZ &transform) const
Circle * clone () const
- Public Member Functions inherited from LibBoard::Ellipse
 Ellipse (double x, double y, double xRadius, double yRadius, DGtal::Color pen, DGtal::Color fill, double lineWidth, const LineStyle lineStyle=SolidStyle, int depthValue=-1)
void flushPostscript (std::ostream &stream, const TransformEPS &transform) const
void flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< DGtal::Color, int > &colormap) const
Rect boundingBox () const
- Public Member Functions inherited from LibBoard::Shape
 Shape (DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, LineStyle style, const LineCap cap, const LineJoin join, int depth)
virtual ~Shape ()
bool filled () const
Shape & rotateDeg (double angle, const Point &center)
Shape & rotateDeg (double angle)
Rect bbox ()
Shape & operator-- ()
Shape & operator++ ()
int depth () const
virtual void depth (int)
virtual void shiftDepth (int shift)
const DGtal::Color & penColor () const
const DGtal::Color & fillColor () const

Static Private Attributes

static const std::string _name

Additional Inherited Members

- Protected Attributes inherited from LibBoard::Ellipse
Point _center
double _xRadius
double _yRadius
double _angle
bool _circle
- Protected Attributes inherited from LibBoard::Shape
int _depth
DGtal::Color _penColor
DGtal::Color _fillColor
double _lineWidth
LineStyle _lineStyle
LineCap _lineCap
LineJoin _lineJoin

Detailed Description

A circle.

The circle structure.


Constructor & Destructor Documentation

LibBoard::Circle::Circle ( double  x,
double  y,
double  radius,
DGtal::Color  pen,
DGtal::Color  fill,
double  lineWidth,
const LineStyle  style = SolidStyle,
int  depthValue = -1 
)
inline

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.

References LibBoard::Ellipse::_center.

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

Return a copy of the shape.

Returns:

Reimplemented from LibBoard::Ellipse.

References Circle().

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:
streamThe output stream.
transformA 2D transform to be applied.

Reimplemented from LibBoard::Ellipse.

Reimplemented in LibBoard::Arc.

References LibBoard::Ellipse::_center, LibBoard::Ellipse::_circle, LibBoard::Ellipse::_xRadius, LibBoard::Transform::mapX(), LibBoard::TransformSVG::mapY(), LibBoard::Transform::scale(), LibBoard::Shape::svgProperties(), LibBoard::Point::x, and LibBoard::Point::y.

void LibBoard::Circle::flushTikZ ( std::ostream &  stream,
const TransformTikZ &  transform 
) const
virtual

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

Parameters:
streamThe output stream.
transformA 2D transform to be applied.

Reimplemented from LibBoard::Ellipse.

Reimplemented in LibBoard::Arc.

References LibBoard::Ellipse::_center, LibBoard::Ellipse::_circle, LibBoard::Ellipse::_xRadius, LibBoard::Transform::mapX(), LibBoard::TransformSVG::mapY(), LibBoard::Transform::scale(), LibBoard::Shape::tikzProperties(), 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.

Reimplemented in LibBoard::Arc.

References _name.

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

Rotate the shape around a given center of rotation.

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

Reimplemented from LibBoard::Ellipse.

References LibBoard::Ellipse::_center, LibBoard::Ellipse::_circle, and LibBoard::Point::rotate().

Referenced by rotate().

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

Rotate the shape around its center.

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

Reimplemented from LibBoard::Ellipse.

References LibBoard::Ellipse::_circle, and rotate().

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

Reimplemented from LibBoard::Ellipse.

References Circle().

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

Reimplemented from LibBoard::Ellipse.

References Circle().

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

Scale the shape along the x an y axis.

Parameters:
sxThe scale factor along the x axis.
syThe scale factor along the y axis.
Returns:
The shape itself.

Reimplemented from LibBoard::Ellipse.

Referenced by scale().

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

Scale the shape along both axis.

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

Reimplemented from LibBoard::Ellipse.

References scale().

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

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

Parameters:
sThe scaling factor.

Reimplemented from LibBoard::Ellipse.

References LibBoard::Ellipse::_center, LibBoard::Ellipse::_xRadius, and LibBoard::Ellipse::_yRadius.

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

Reimplemented from LibBoard::Ellipse.

References Circle().

Circle LibBoard::Circle::scaled ( double  s) const

Reimplemented from LibBoard::Ellipse.

References Circle().

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

Translate the shape by a given offset.

Parameters:
dxThe x offset.
dyThe y offset.
Returns:
A reference to the shape itself.

Reimplemented from LibBoard::Ellipse.

References LibBoard::Ellipse::_center.

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

Reimplemented from LibBoard::Ellipse.

References Circle().


Field Documentation

const std::string LibBoard::Circle::_name
staticprivate

The generic name of the shape.

Reimplemented from LibBoard::Ellipse.

Reimplemented in LibBoard::Arc.

Referenced by name().


The documentation for this struct was generated from the following files: