MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / draw_x_axis

Function draw_x_axis

src/fe-analysedriveresponse.cc:172–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172static 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
199static void draw_y_graticules(Agg2D& painter,
200 double x1,

Callers 1

mainAnalyseDriveResponseFunction · 0.85

Calls 7

do_in_stepsFunction · 0.85
noFillMethod · 0.80
lineColorMethod · 0.80
textAlignmentMethod · 0.80
lineMethod · 0.45
textSizeMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected