5 #ifndef BPP_GRAPHICS_GRAPHICDEVICE_H 6 #define BPP_GRAPHICS_GRAPHICDEVICE_H 36 virtual void begin() = 0;
45 virtual void end() = 0;
50 virtual void setXUnit(
double xu) = 0;
55 virtual void setYUnit(
double yu) = 0;
60 virtual double getXUnit()
const = 0;
65 virtual double getYUnit()
const = 0;
67 virtual void setCurrentForegroundColor(
const RGBColor& color) = 0;
68 virtual void setCurrentBackgroundColor(
const RGBColor& color) = 0;
69 virtual void setCurrentFont(
const Font& font) = 0;
70 virtual void setCurrentPointSize(
unsigned int size) = 0;
71 virtual void setCurrentLineType(
short type) = 0;
72 virtual void setCurrentLayer(
int layerIndex) = 0;
74 virtual const RGBColor& getCurrentForegroundColor()
const = 0;
75 virtual const RGBColor& getCurrentBackgroundColor()
const = 0;
76 virtual const Font& getCurrentFont()
const = 0;
77 virtual unsigned int getCurrentPointSize()
const = 0;
78 virtual short getCurrentLineType()
const = 0;
79 virtual int getCurrentLayer()
const = 0;
92 virtual void drawLine(
double x1,
double y1,
double x2,
double y2) = 0;
106 virtual void drawRect(
double x,
double y,
double width,
double height,
short fill = FILL_EMPTY) = 0;
119 virtual void drawCircle(
double x,
double y,
double radius,
short fill = FILL_EMPTY) = 0;
133 virtual void drawText(
double x,
double y,
const std::string& text,
short hpos = TEXT_HORIZONTAL_LEFT,
short vpos = TEXT_VERTICAL_BOTTOM,
double angle = 0) = 0;
140 virtual void comment(
const std::string& comment) = 0;
159 #endif // BPP_GRAPHICS_GRAPHICDEVICE_H
Data structure for fonts.
static short TEXT_VERTICAL_TOP
Describe a color according to its red, green and blue componants.
static short TEXT_HORIZONTAL_RIGHT
static short FILL_PATTERN
UnvalidFlagException(const std::string &text)
Interface for all plotting devices.
static short TEXT_HORIZONTAL_CENTER
Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception)
static short TEXT_VERTICAL_BOTTOM
static short TEXT_VERTICAL_CENTER
static short TEXT_HORIZONTAL_LEFT