DGtal 1.3.0
|
A triangle. Basically a Polyline with a convenient constructor. More...
#include <Board/Shapes.h>
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 |
Triangle * | clone () 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) | |
const std::string & | name () const |
Point | center () const |
Polyline & | operator<< (const Point &p) |
Point & | operator[] (const unsigned int n) |
Polyline & | rotate (double angle, const Point ¢er) |
Polyline | rotated (double angle, const Point ¢er) const |
Polyline & | rotate (double angle) |
Polyline | rotated (double angle) const |
Polyline & | translate (double dx, double dy) |
Polyline | translated (double dx, double dy) const |
Shape & | scale (double sx, double sy) |
Shape & | scale (double s) |
Polyline | scaled (double sx, double sy) const |
Polyline | scaled (double s) const |
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 | flushCairo (cairo_t *cr, const TransformCairo &transform) const |
void | flushTikZ (std::ostream &stream, const TransformTikZ &transform) const |
Rect | boundingBox () const |
Polyline * | clone () 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 () |
virtual const std::string & | name () const |
virtual Shape * | clone () const =0 |
bool | filled () const |
virtual Point | center () const =0 |
virtual Shape & | rotate (double angle, const Point ¢er)=0 |
virtual Shape & | rotate (double angle)=0 |
Shape & | rotateDeg (double angle, const Point ¢er) |
Shape & | rotateDeg (double angle) |
virtual Shape & | translate (double dx, double dy)=0 |
virtual Shape & | scale (double sx, double sy)=0 |
virtual Shape & | scale (double s)=0 |
virtual Rect | boundingBox () const =0 |
Rect | bbox () |
Shape & | operator-- () |
Shape & | operator++ () |
virtual void | scaleAll (double s)=0 |
virtual void | flushPostscript (std::ostream &stream, const TransformEPS &transform) const =0 |
virtual void | flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< DGtal::Color, int > &colormap) const =0 |
virtual void | flushSVG (std::ostream &stream, const TransformSVG &transform) const =0 |
virtual void | flushCairo (cairo_t *cr, const TransformCairo &transform) const =0 |
virtual void | flushTikZ (std::ostream &stream, const TransformTikZ &transform) const =0 |
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 | |
Public Types inherited from LibBoard::Shape | |
enum | LineCap { ButtCap = 0 , RoundCap , SquareCap } |
enum | LineJoin { MiterJoin = 0 , RoundJoin , BevelJoin } |
enum | LineStyle { SolidStyle = 0 , DashStyle , DotStyle , DashDotStyle , DashDotDotStyle , DashDotDotDotStyle } |
Protected Member Functions inherited from LibBoard::Shape | |
std::string | svgProperties (const TransformSVG &transform) const |
std::string | postscriptProperties () const |
void | setCairoDashStyle (cairo_t *cr, LineStyle type) const |
std::string | tikzProperties (const TransformTikZ &transform) const |
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 |
A triangle. Basically a Polyline with a convenient constructor.
The Triangle structure.
Definition at line 1085 of file Board/Shapes.h.
|
inline |
Definition at line 1087 of file Board/Shapes.h.
References LibBoard::Polyline::_path.
|
inline |
|
virtual |
Return a copy of the shape.
Reimplemented from LibBoard::Polyline.
Definition at line 2350 of file Shapes.cpp.
|
virtual |
Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)
Reimplemented from LibBoard::Polyline.
Reimplemented in LibBoard::QuadraticBezierCurve.
Definition at line 2320 of file Shapes.cpp.
References _name.
Triangle LibBoard::Triangle::rotated | ( | double | angle | ) | const |
Definition at line 2326 of file Shapes.cpp.
References LibBoard::Polyline::rotate().
Triangle LibBoard::Triangle::scaled | ( | double | s | ) | const |
Definition at line 2344 of file Shapes.cpp.
References LibBoard::Polyline::scale().
Triangle LibBoard::Triangle::scaled | ( | double | sx, |
double | sy | ||
) | const |
Returns a scaled copy of the triangle.
sx | Scale factor along the x axis. |
sy | Scale factor along the y axis. |
Definition at line 2338 of file Shapes.cpp.
References LibBoard::Polyline::scale().
Triangle LibBoard::Triangle::translated | ( | double | dx, |
double | dy | ||
) | const |
Returns a translated copy of the triangle.
dx | The shift along the x axis. |
dy | The shift along the y axis. |
Definition at line 2332 of file Shapes.cpp.
References LibBoard::Polyline::translate().
|
staticprivate |
The generic name of the shape.
Definition at line 1151 of file Board/Shapes.h.
Referenced by name().