14 #ifndef _BOARD_BOARD_H_
15 #define _BOARD_BOARD_H_
21 #include "Board/Point.h"
22 #include "Board/Path.h"
23 #include "Board/Shapes.h"
24 #include "Board/ShapeList.h"
26 #include "DGtal/io/Color.h"
104 void clear(
unsigned char red,
unsigned char green,
unsigned char blue );
148 void drawDot(
double x,
double y,
int depthValue = -1 );
159 void drawLine(
double x1,
double y1,
double x2,
double y2,
160 int depthValue = -1 );
175 int depthValue = -1 );
187 void drawArrow(
double x1,
double y1,
double x2,
double y2,
189 int depthValue = -1 );
203 double x2,
double y2,
204 double x3,
double y3,
205 int depthValue = -1 );
218 int depthValue = -1 );
232 void drawArc(
double x,
double y,
double radius,
double angle1,
double angle2,
233 bool neg,
int depthValue = -1 );
247 double x2,
double y2,
248 double x3,
double y3,
249 int depthValue = -1 );
269 unsigned char divisions = 3,
270 int depthValue = -1 );
289 const double x2,
const double y2,
291 const double x3,
const double y3,
293 unsigned char divisions = 3,
294 int depthValue = -1 );
309 const float brightness1,
311 const float brightness2,
313 const float brightness3,
314 unsigned char divisions = 3,
315 int depthValue = -1 );
334 const float brightness1,
335 const double x2,
const double y2,
336 const float brightness2,
337 const double x3,
const double y3,
338 const float brightness3,
339 unsigned char divisions = 3,
340 int depthValue = -1 );
354 int depthValue = -1 );
366 double width,
double height,
367 int depthValue = -1 );
379 void drawImage( std::string filename,
double x,
double y,
380 double width,
double height,
381 int depthValue = -1,
double alpha=1.0 );
393 double width,
double height,
394 int depthValue = -1 );
404 void drawCircle(
double x,
double y,
double radius,
405 int depthValue = -1 );
415 void fillCircle(
double x,
double y,
double radius,
416 int depthValue = -1);
428 double xRadius,
double yRadius,
429 int depthValue = -1);
441 double xRadius,
double yRadius,
442 int depthValue = -1);
451 int depthValue = -1 );
460 int depthValue = -1 );
469 int depthValue = -1 );
479 void drawText(
double x,
double y,
const char * text,
480 int depthValue = -1 );
491 const std::string & str,
492 int depthValue = -1 );
523 unsigned char alpha = 255 );
537 float alpha = 1.0f );
561 unsigned char alpha = 255 );
643 double width,
double height );
671 double dx,
double dy,
double scale = 1.0 );
687 double dx,
double dy,
690 double angle = 0.0 );
713 void save(
const char * filename,
double pageWidth,
double pageHeight,
double margin = 10.0 )
const;
745 void saveEPS(
const char * filename,
double pageWidth,
double pageHeight,
double margin = 10.0 )
const ;
758 void saveEPS( std::ostream &out,
double pageWidth,
double pageHeight,
double margin = 10.0)
const ;
770 bool includeFIGHeader=
true)
const;
782 bool includeFIGHeader=
true)
const;
794 void saveFIG(
const char * filename,
double pageWidth,
double pageHeight,
double margin = 10.0,
795 bool includeFIGHeader=
true)
const ;
809 void saveFIG( std::ostream &out,
double pageWidth,
double pageHeight,
double margin = 10.0,
810 bool includeFIGHeader=
true )
const ;
843 void saveSVG(
const char * filename,
double pageWidth,
double pageHeight,
double margin = 10.0 )
const ;
856 void saveSVG( std::ostream &out,
double pageWidth,
double pageHeight,
double margin = 10.0,
857 std::string filename=
"output.svg")
const ;
884 void saveCairo(
const char * filename,
CairoType type,
double pageWidth,
double pageHeight,
double margin = 10.0 )
const ;
919 void saveTikZ(
const char * filename,
double pageWidth,
double pageHeight,
double margin = 10.0 )
const ;
932 void saveTikZ( std::ostream &out,
double pageWidth,
double pageHeight,
double margin = 10.0 )
const ;
Structure representing an RGB triple with alpha component.
Class for EPS, FIG or SVG drawings.
Board & setLineStyle(Shape::LineStyle style)
void drawRectangle(double x, double y, double width, double height, int depthValue=-1)
Board & setFont(const Fonts::Font font, double fontSize)
Board & setPenColor(const DGtal::Color &color)
void fillTriangle(double x1, double y1, double x2, double y2, double x3, double y3, int depthValue=-1)
void setClippingRectangle(double x, double y, double width, double height)
void clear(unsigned char red, unsigned char green, unsigned char blue)
DGtal::Color _backgroundColor
void drawEllipse(double x, double y, double xRadius, double yRadius, int depthValue=-1)
void drawPolyline(const std::vector< Point > &points, int depthValue=-1)
Board & setFontSize(double fontSize)
void saveTikZ(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
void saveFIG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0, bool includeFIGHeader=true) const
void setClippingPath(const std::vector< Point > &points)
Board & operator<<(const Shape &shape)
void drawTriangle(double x1, double y1, double x2, double y2, double x3, double y3, int depthValue=-1)
Board & setLineCap(Shape::LineCap cap)
Board & setLineJoin(Shape::LineJoin join)
void drawQuadraticBezierCurve(double x1, double y1, double x2, double y2, double x3, double y3, int depthValue=-1)
void fillCircle(double x, double y, double radius, int depthValue=-1)
void drawLine(double x1, double y1, double x2, double y2, int depthValue=-1)
void fillPolyline(const std::vector< Point > &points, int depthValue=-1)
Board & operator=(const Board &other)
void save(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Board & setPenColorRGBi(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255)
void drawDot(double x, double y, int depthValue=-1)
static const double Degree
void drawClosedPolyline(const std::vector< Point > &points, int depthValue=-1)
void drawArc(double x, double y, double radius, double angle1, double angle2, bool neg, int depthValue=-1)
void fillGouraudTriangle(const Point &p1, const DGtal::Color &color1, const Point &p2, const DGtal::Color &color2, const Point &p3, const DGtal::Color &color3, unsigned char divisions=3, int depthValue=-1)
void drawArrow(double x1, double y1, double x2, double y2, bool filled=true, int depthValue=-1)
Board & setPenColorRGBf(float red, float green, float blue, float alpha=1.0f)
void drawCircle(double x, double y, double radius, int depthValue=-1)
Shape & translate(double dx, double dy)
void fillGouraudTriangle(const double x1, const double y1, const float brightness1, const double x2, const double y2, const float brightness2, const double x3, const double y3, const float brightness3, unsigned char divisions=3, int depthValue=-1)
void fillRectangle(double x, double y, double width, double height, int depthValue=-1)
Board translated(double dx, double dy)
Shape & rotate(double angle, const Point ¢er)
void addDuplicates(const Shape &shape, unsigned int times, double dx, double dy, double scale=1.0)
Board scaled(double sx, double sy)
void drawText(double x, double y, const char *text, int depthValue=-1)
Board & setFillColorRGBi(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255)
Board & setFillColor(const DGtal::Color &color)
Board & setLineWidth(double width)
void fillEllipse(double x, double y, double xRadius, double yRadius, int depthValue=-1)
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
void fillGouraudTriangle(const double x1, const double y1, const DGtal::Color &color1, const double x2, const double y2, const DGtal::Color &color2, const double x3, const double y3, const DGtal::Color &color3, unsigned char divisions=3, int depthValue=-1)
void backgroundColor(const DGtal::Color &color)
void drawImage(std::string filename, double x, double y, double width, double height, int depthValue=-1, double alpha=1.0)
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Board & setFillColorRGBf(float red, float green, float blue, float alpha=1.0f)
Board(const DGtal::Color &backgroundColor=DGtal::Color::None)
Shape & scale(double sx, double sy)
Board rotated(double angle, const Point ¢er)
void drawBoundingBox(int depthValue=-1)
void saveCairo(const char *filename, CairoType type=CairoPNG, PageSize size=Board::BoundingBox, double margin=10.0) const
double unit(const double &x)
Shape::LineStyle lineStyle
Point unit(const Point &p)
A path, according to Postscript and SVG definition.
Struct representing a 2D point.
Abstract structure for a 2D shape.
virtual void scaleAll(double s)=0