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