33#ifndef TTA_EPS_GENERATOR_HH
34#define TTA_EPS_GENERATOR_HH
63 void setFont(
unsigned size, std::string fontName =
"Courier-Bold");
70 void drawRectangle(
int x,
int y,
unsigned width,
unsigned height);
73 void drawCircle(
int x,
int y,
unsigned radius);
76 void drawEllipse(
int x,
int y,
unsigned width,
unsigned height);
82 void drawText(
int x,
int y, std::string text);
84 void drawLine(
int llx,
int lly,
int urx,
int ury);
void setTitle(std::string title)
unsigned yMargin_
Margin to add on the top and bottom side of the figure in pixels.
void drawLine(int llx, int lly, int urx, int ury)
unsigned lineWidth_
Current width of the lines drawn.
void drawRectangle(int x, int y, unsigned width, unsigned height)
bool hasTitle_
True, if the EPS file has a title.
static const std::string FMT_MOVETO
Format string for postscript moveto command.
double scale_
Final scaling factor for the eps file.
EPSGenerator(const EPSGenerator &)
Copying forbidden.
static const unsigned DEFAULT_MARGIN
Default margin width.
void drawPolygon(const VertexList &vertices)
int minX_
Minimum x-coordinate used before scaling & translation.
void drawFilledCircle(int x, int y, unsigned radius)
void drawFilledRectangle(int x, int y, unsigned width, unsigned height)
std::string title_
Title of the EPS file.
void drawFilledPolygon(const VertexList &vertices)
int minY_
Minimum y-coordinate used before scaling & translation.
void drawText(int x, int y, std::string text)
unsigned xMargin_
Margin to add on the left and right side of the figure in pixels.
void doDrawEllipse(int x, int y, unsigned width, unsigned height, bool fill)
void appendToBounds(int x, int y)
void setFont(unsigned size, std::string fontName="Courier-Bold")
colour lineColour_
Current drawing colour for lines.
colour fillColour_
Current colour for filling shape backgrounds.
void setMargins(unsigned x, unsigned y)
static const std::string FMT_LINETO
Format string for postscript lineto command.
std::string creationDate_
String describing the creation date of the EPS file.
void drawCirclePath(int x, int y, unsigned radius)
void drawPolygonPath(const VertexList &vertices)
void drawCircle(int x, int y, unsigned radius)
void drawEllipse(int x, int y, unsigned width, unsigned height)
int maxY_
Maximum y-coordinate used before scaling & translation.
void drawRectanglePath(int x, int y, unsigned width, unsigned height)
void drawFilledEllipse(int x, int y, unsigned width, unsigned height)
void setLineColour(double r, double g, double b)
void writeEPS(std::ostream &stream)
int maxX_
Maximum x-coordinate used before scaling & translation.
EPSGenerator & operator=(const EPSGenerator &)
Assignment forbidden.
bool boundsSet_
True, if a point has been added to the bounds.
std::queue< std::string > buffer_
Buffer for the .eps code to be written.
static const std::string FMT_RLINETO
Format string for postscript rlineto command.
void setLineWidth(unsigned width)
std::string creator_
String describing the creator of the document.
void setFillColour(double r, double g, double b)
void setScale(double scale)
void setCreator(std::string creator)