Public Member Functions | Static Private Attributes

LibBoard::Triangle Struct Reference

A triangle. Basically a Polyline with a convenient constructor. More...

#include <Shapes.h>

Inheritance diagram for LibBoard::Triangle:
Inheritance graph
[legend]
Collaboration diagram for LibBoard::Triangle:
Collaboration graph
[legend]

Public Member Functions

 Triangle (const Point &p1, const Point &p2, const Point &p3, Color pen, 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, Color pen, 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

Static Private Attributes

static const std::string _name

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,
Color  pen,
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,
Color  pen,
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:
sx Scale factor along the x axis.
sy Scale 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:
dx The shift along the x axis.
dy The 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 [static, private]

The generic name of the shape.

Reimplemented from LibBoard::Polyline.

Referenced by name().


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