DGtal 1.3.0
|
Used to draw image in figure. More...
#include <Board/Shapes.h>
Public Member Functions | |
Image (double x0, double y0, double width, double height, std::string fileName, int depthValue, double alpha=1.0) | |
const std::string & | name () const |
Image * | clone () 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 |
Public Member Functions inherited from LibBoard::Rectangle | |
Rectangle (double x, double y, double width, double height, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1) | |
Rectangle (const Rect &rect, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1) | |
const std::string & | name () const |
double | x () const |
double | y () const |
double | width () |
double | height () |
Point | topLeft () |
Point | topRight () |
Point | bottomLeft () |
Point | bottomRight () |
Rectangle | rotated (double angle, const Point ¢er) const |
Rectangle | rotated (double angle) const |
Rectangle | translated (double dx, double dy) const |
Rectangle | scaled (double sx, double sy) const |
Rectangle | scaled (double s) const |
void | scaleAll (double s) |
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 |
Rectangle * | 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 |
Protected Attributes | |
double | _x0 |
double | _y0 |
double | _width |
double | _height |
std::string | _filename |
double | _alpha |
Protected Attributes inherited from LibBoard::Rectangle | |
bool | _isRectangle |
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 |
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 |
|
inline |
Constructs a Image.
x0 | First coordinate of the start point. |
y0 | Second coordinate of the start point. |
width | First coordinate of the end point. |
height | Second coordinate of the end point. |
fileName | the image filename. |
depthValue | The depth of the image. |
alpha | The image transparency used for display (works only is cairo is installed). |
|
virtual |
Return a copy of the shape.
Reimplemented from LibBoard::Rectangle.
Definition at line 639 of file Shapes.cpp.
|
virtual |
Writes the cairo code of the shape in a cairo drawing context according to a transform.
cr | The cairo drawing context. |
transform | A 2D transform to be applied. |
Reimplemented from LibBoard::Rectangle.
Definition at line 686 of file Shapes.cpp.
References _alpha, _filename, and LibBoard::Polyline::_path.
|
virtual |
Writes the FIG code of the shape in a stream according to a transform.
stream | The output stream. |
transform | A 2D transform to be applied. |
colormap | A colormap. |
Reimplemented from LibBoard::Rectangle.
Definition at line 644 of file Shapes.cpp.
References LibBoard::Shape::_depth, _filename, LibBoard::Shape::_lineStyle, LibBoard::Shape::_lineWidth, LibBoard::Polyline::_path, LibBoard::Shape::_penColor, LibBoard::Path::flushFIG(), and DGtal::Color::valid().
|
virtual |
Writes the SVG code of the shape in a stream according to a transform.
stream | The output stream. |
transform | A 2D transform to be applied. |
Reimplemented from LibBoard::Rectangle.
Definition at line 669 of file Shapes.cpp.
References _filename, and LibBoard::Polyline::_path.
|
virtual |
Writes the TikZ code of the shape in a stream according to a transform.
stream | The output stream. |
transform | A 2D transform to be applied. |
Reimplemented from LibBoard::Rectangle.
Definition at line 714 of file Shapes.cpp.
References _filename, and LibBoard::Polyline::_path.
|
virtual |
Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)
Reimplemented from LibBoard::Rectangle.
Definition at line 633 of file Shapes.cpp.
References _name.
|
protected |
Definition at line 1076 of file Board/Shapes.h.
Referenced by flushCairo().
|
protected |
Definition at line 1075 of file Board/Shapes.h.
Referenced by flushCairo(), flushFIG(), flushSVG(), and flushTikZ().
|
protected |
Definition at line 1074 of file Board/Shapes.h.
|
staticprivate |
The generic name of the shape.
Definition at line 1068 of file Board/Shapes.h.
Referenced by name().
|
protected |
Definition at line 1073 of file Board/Shapes.h.
|
protected |
First coordinate of the bottom left point.
Definition at line 1071 of file Board/Shapes.h.
|
protected |
Second coordinate of the bottom left point.
Definition at line 1072 of file Board/Shapes.h.