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

#include <Shapes.h>

Inheritance diagram for LibBoard::Triangle:
Collaboration diagram for LibBoard::Triangle:

Public Member Functions

 Triangle (const Point &p1, const Point &p2, const Point &p3, DGtal::Color pen, DGtal::Color fill, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depthValue=-1)
 Triangle (const double x1, const double y1, const double x2, const double y2, const double x3, const double y3, DGtal::Color pen, DGtal::Color fill, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depthValue=-1)
const std::string & name () const
Triangle rotated (double angle) const
Triangle translated (double dx, double dy) const
Triangle scaled (double sx, double sy) const
Triangle scaled (double s) const
Triangleclone () const
- Public Member Functions inherited from LibBoard::Polyline
 Polyline (const std::vector< Point > &points, bool closed, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle lineStyle=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
 Polyline (const Path &path, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle lineStyle=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
 Polyline (bool closed, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle lineStyle=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
Point center () const
Polylineoperator<< (const Point &p)
Pointoperator[] (const unsigned int n)
Polylinerotate (double angle, const Point &center)
Polyline rotated (double angle, const Point &center) const
Polylinerotate (double angle)
Polylinetranslate (double dx, double dy)
Shapescale (double sx, double sy)
Shapescale (double s)
void scaleAll (double s)
void flushPostscript (std::ostream &stream, const TransformEPS &transform) const
void flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< DGtal::Color, int > &colormap) const
void flushSVG (std::ostream &stream, const TransformSVG &transform) const
void flushTikZ (std::ostream &stream, const TransformTikZ &transform) 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
ShaperotateDeg (double angle, const Point &center)
ShaperotateDeg (double angle)
Rect bbox ()
Shapeoperator-- ()
Shapeoperator++ ()
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::Polyline
Path _path
- 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 triangle. Basically a Polyline with a convenient constructor.

The Triangle structure.


Constructor & Destructor Documentation

LibBoard::Triangle::Triangle ( const Point p1,
const Point p2,
const Point p3,
DGtal::Color  pen,
DGtal::Color  fill,
double  lineWidth,
const LineStyle  style = SolidStyle,
const LineCap  cap = ButtCap,
const LineJoin  join = MiterJoin,
int  depthValue = -1 
)
inline
LibBoard::Triangle::Triangle ( const double  x1,
const double  y1,
const double  x2,
const double  y2,
const double  x3,
const double  y3,
DGtal::Color  pen,
DGtal::Color  fill,
double  lineWidth,
const LineStyle  style = SolidStyle,
const LineCap  cap = ButtCap,
const LineJoin  join = MiterJoin,
int  depthValue = -1 
)
inline

Member Function Documentation

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

Return a copy of the shape.

Returns:

Reimplemented from LibBoard::Polyline.

References Triangle().

const std::string & LibBoard::Triangle::name ( ) const
virtual

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

Returns:

Reimplemented from LibBoard::Polyline.

References _name.

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

Reimplemented from LibBoard::Polyline.

References Triangle().

Triangle LibBoard::Triangle::scaled ( double  sx,
double  sy 
) const

Returns a scaled copy of the triangle.

Parameters:
sxScale factor along the x axis.
syScale factor along the y axis.
Returns:
A scaled copy of the arrow.

Reimplemented from LibBoard::Polyline.

References Triangle().

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

Reimplemented from LibBoard::Polyline.

References Triangle().

Triangle LibBoard::Triangle::translated ( double  dx,
double  dy 
) const

Returns a translated copy of the triangle.

Parameters:
dxThe shift along the x axis.
dyThe shift along the y axis.
Returns:
A translated copy of the line.

Reimplemented from LibBoard::Polyline.

References Triangle().


Field Documentation

const std::string LibBoard::Triangle::_name
staticprivate

The generic name of the shape.

Reimplemented from LibBoard::Polyline.

Referenced by name().


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