| 170 | } |
| 171 | |
| 172 | static void draw_x_axis(Agg2D& painter, |
| 173 | double x1, |
| 174 | double x2, |
| 175 | double y, |
| 176 | double lo, |
| 177 | double hi, |
| 178 | double step, |
| 179 | const std::string& format) |
| 180 | { |
| 181 | painter.noFill(); |
| 182 | painter.lineColor(0, 0, 0); |
| 183 | painter.line(x1, y, x2, y); |
| 184 | painter.textSize(10.0); |
| 185 | painter.textAlignment(Agg2D::AlignCenter); |
| 186 | |
| 187 | do_in_steps(x1, |
| 188 | x2, |
| 189 | lo, |
| 190 | hi, |
| 191 | step, |
| 192 | [&](double x, double v) |
| 193 | { |
| 194 | painter.line(x, y, x, y + 5); |
| 195 | painter.text(x, y + 18, fmt::format(fmt::runtime(format), v)); |
| 196 | }); |
| 197 | } |
| 198 | |
| 199 | static void draw_y_graticules(Agg2D& painter, |
| 200 | double x1, |
no test coverage detected