41 #ifndef BPP_GRAPHICS_SVG_SVGGRAPHICDEVICE_H
42 #define BPP_GRAPHICS_SVG_SVGGRAPHICDEVICE_H
45 #include "../AbstractGraphicDevice.h"
46 #include "../ColorTools.h"
61 std::map<int, std::vector<std::string>, std::greater<int> >
layers_;
87 void drawLine(
double x1,
double y1,
double x2,
double y2);
88 void drawRect(
double x,
double y,
double width,
double height,
short fill =
FILL_EMPTY);
Partial implementation of the GraphicDevice interface.
int getCurrentLayer() const
static const short int STYLE_NORMAL
static const short int STYLE_ITALIC
static const short int WEIGHT_NORMAL
static const short int WEIGHT_BOLD
static short TEXT_HORIZONTAL_LEFT
static short TEXT_VERTICAL_BOTTOM
Describe a color according to its red, green and blue componants.
void drawCircle(double x, double y, double radius, short fill=FILL_EMPTY)
Draw a circle.
std::map< int, std::vector< std::string >, std::greater< int > > layers_
static std::string colorToText(const RGBColor &color)
void drawLine(double x1, double y1, double x2, double y2)
Draw a line between two points.
void drawRect(double x, double y, double width, double height, short fill=FILL_EMPTY)
Draw a rectangle.
std::map< short int, std::string > fontWeights_
SvgGraphicDevice(std::ostream &out, bool inkscapeEnabled=false)
std::map< short int, std::string > fontStyles_
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.
void begin()
Start the painting.
virtual ~SvgGraphicDevice()
void end()
End the painting.
void comment(const std::string &text)
Add a comment in the output.
std::string toString(T t)
General template method to convert to a string.