18 #ifndef OB_ASCIIPAINTER_H 19 #define OB_ASCIIPAINTER_H 32 void NewCanvas(
double width,
double height);
41 void DrawLine(
double x1,
double y1,
double x2,
double y2,
const std::vector<double> & dashes=std::vector<double>());
42 void DrawPolygon(
const std::vector<std::pair<double,double> > &points);
44 void DrawBall(
double x,
double y,
double r,
double opacity = 1.0);
45 void DrawText(
double x,
double y,
const std::string &text);
51 void Write(std::ostream &ofs);
53 std::string
Bresenham(
int x,
int y,
int x2,
int y2, std::vector<std::pair<int, int> > &coords);
57 std::vector<std::vector<char> > m_buf;
58 int m_width, m_height;
void SetFillColor(const OBColor &color)
Definition: asciipainter.cpp:58
Abstract painter base class used by OBDepict.
Definition: painter.h:128
void DrawBall(double x, double y, double r, double opacity=1.0)
Definition: asciipainter.cpp:110
bool IsGood() const
Definition: asciipainter.cpp:49
void SetFontSize(int pointSize)
Definition: asciipainter.cpp:54
void SetPenColor(const OBColor &color)
Definition: asciipainter.cpp:67
OBFontMetrics GetFontMetrics(const std::string &text)
Definition: asciipainter.cpp:124
void DrawCircle(double x, double y, double r)
Definition: asciipainter.cpp:106
void DrawText(double x, double y, const std::string &text)
Definition: asciipainter.cpp:114
void NewCanvas(double width, double height)
Definition: asciipainter.cpp:42
void DrawLine(double x1, double y1, double x2, double y2, const std::vector< double > &dashes=std::vector< double >())
Definition: asciipainter.cpp:80
~ASCIIPainter()
Definition: asciipainter.cpp:38
void SetFillRadial(const OBColor &start, const OBColor &end)
Definition: asciipainter.cpp:62
void DrawPolygon(const std::vector< std::pair< double, double > > &points)
Definition: asciipainter.cpp:95
Color class used by OBDepict.
Definition: painter.h:37
Font metrics class used by OBDepict.
Definition: painter.h:116
double GetPenWidth()
Definition: asciipainter.cpp:75
void SetPenWidth(double width)
Definition: asciipainter.cpp:71
Definition: asciipainter.h:25
int round(double r)
Definition: asciipainter.cpp:148
void Write(std::ostream &ofs)
Definition: asciipainter.cpp:136
std::string Bresenham(int x, int y, int x2, int y2, std::vector< std::pair< int, int > > &coords)
Definition: asciipainter.cpp:191
Base class for graphical 2D depiction classes (e.g., "paint" to SVG)
ASCIIPainter(int width, int height, double aspect)
Definition: asciipainter.cpp:28
void SetFontFamily(const std::string &fontFamily)
Definition: asciipainter.h:34
Global namespace for all Open Babel code.
Definition: alias.h:22