27 m_isGnuplot (isGnuplot),
47 QString filename (
"grid.gnuplot");
48 QFile file (filename);
49 QTextStream fileStr (&file);
53 file.open (QIODevice::WriteOnly | QIODevice::Append);
59bool GridLog::inBounds (
int x,
int y)
const
79 m_logStr << x - halfWidth <<
" " << - (y - halfWidth) <<
"\n";
80 m_logStr << x + halfWidth <<
" " << - (y - halfWidth) <<
"\n";
81 m_logStr << x + halfWidth <<
" " << - (y + halfWidth) <<
"\n";
82 m_logStr << x - halfWidth <<
" " << - (y + halfWidth) <<
"\n";
83 m_logStr << x - halfWidth <<
" " << - (y - halfWidth) <<
"\n";
92 if (m_isGnuplot && inBounds (x, y)) {
95 m_logStr << x <<
" " << - (y - radius) <<
"\n";
96 m_logStr << x + radius <<
" " << - (y ) <<
"\n";
97 m_logStr << x <<
" " << - (y + radius) <<
"\n";
98 m_logStr << x - radius <<
" " << - (y ) <<
"\n";
99 m_logStr << x <<
" " << - (y - radius) <<
"\n";
112 if (inBounds (p0.x(), p0.y()) ||
113 inBounds (p1.x(), p1.y()) ||
114 inBounds (p2.x(), p2.y()) ||
115 inBounds (p3.x(), p3.y())) {
117 m_logStr << p0.x() <<
" " << - p0.y() <<
"\n";
118 m_logStr << p1.x() <<
" " << - p1.y() <<
"\n";
119 m_logStr << p2.x() <<
" " << - p2.y() <<
"\n";
120 m_logStr << p3.x() <<
" " << - p3.y() <<
"\n";
121 m_logStr << p0.x() <<
" " << - p0.y() <<
"\n";
const int DETAILED_RADIUS
const int DETAILED_CENTER_Y
const int DETAILED_CENTER_X
GridLog(bool isGnuplot)
Single constructor.
void showOutputScanLinePixel(int x, int y, double radius)
Show scan line pixel that is the output of GridHealer.
void showOutputTrapezoid(const QPoint &p0, const QPoint &p1, const QPoint &p2, const QPoint &p3)
Show trapezoids that are intermediate results in GridHealer.
void showInputPixel(const QPoint &p, double halfWidth)
Show pixels that are inputs to GridHealer.
const QString GNUPLOT_FILE_MESSAGE