5 #ifndef BPP_GRAPHICS_SVG_SVGGRAPHICDEVICE_H 6 #define BPP_GRAPHICS_SVG_SVGGRAPHICDEVICE_H 9 #include "../AbstractGraphicDevice.h" 10 #include "../ColorTools.h" 25 std::map<int, std::vector<std::string>, std::greater<int>>
layers_;
35 inkscapeEnabled_(inkscapeEnabled),
36 minx_(0), maxx_(0), miny_(0), maxy_(0),
37 fontStyles_(), fontWeights_()
51 void drawLine(
double x1,
double y1,
double x2,
double y2);
52 void drawRect(
double x,
double y,
double width,
double height,
short fill =
FILL_EMPTY);
67 #endif // BPP_GRAPHICS_SVG_SVGGRAPHICDEVICE_H static const short int WEIGHT_NORMAL
void drawCircle(double x, double y, double radius, short fill=FILL_EMPTY)
Draw a circle.
void begin()
Start the painting.
static const short int STYLE_NORMAL
void drawRect(double x, double y, double width, double height, short fill=FILL_EMPTY)
Draw a rectangle.
void drawLine(double x1, double y1, double x2, double y2)
Draw a line between two points.
static std::string colorToText(const RGBColor &color)
Describe a color according to its red, green and blue componants.
static const short int STYLE_ITALIC
int getCurrentLayer() const
static const short int WEIGHT_BOLD
Partial implementation of the GraphicDevice interface.
std::map< short int, std::string > fontWeights_
virtual ~SvgGraphicDevice()
void comment(const std::string &text)
Add a comment in the output.
void end()
End the painting.
static short TEXT_VERTICAL_BOTTOM
std::map< int, std::vector< std::string >, std::greater< int > > layers_
std::string toString(T t)
General template method to convert to a string.
SvgGraphicDevice(std::ostream &out, bool inkscapeEnabled=false)
void drawText(double x, double y, const std::string &text, short hpos=TEXT_HORIZONTAL_LEFT, short vpos=TEXT_VERTICAL_BOTTOM, double angle=0)
Draw some characters.
std::map< short int, std::string > fontStyles_
static short TEXT_HORIZONTAL_LEFT