MCPcopy Create free account
hub / github.com/creatale/node-dv / RefreshDebugWindow

Method RefreshDebugWindow

deps/tesseract/classify/adaptmatch.cpp:220–237  ·  view source on GitHub ↗

If *win is NULL, sets it to a new ScrollView() object with title msg. Clears the window and draws baselines.

Source from the content-addressed store, hash-verified

218// If *win is NULL, sets it to a new ScrollView() object with title msg.
219// Clears the window and draws baselines.
220void Classify::RefreshDebugWindow(ScrollView **win, const char *msg,
221 int y_offset, const TBOX &wbox) {
222 #ifndef GRAPHICS_DISABLED
223 const int kSampleSpaceWidth = 500;
224 if (*win == NULL) {
225 *win = new ScrollView(msg, 100, y_offset, kSampleSpaceWidth * 2, 200,
226 kSampleSpaceWidth * 2, 200, true);
227 }
228 (*win)->Clear();
229 (*win)->Pen(64, 64, 64);
230 (*win)->Line(-kSampleSpaceWidth, kBlnBaselineOffset,
231 kSampleSpaceWidth, kBlnBaselineOffset);
232 (*win)->Line(-kSampleSpaceWidth, kBlnXHeight + kBlnBaselineOffset,
233 kSampleSpaceWidth, kBlnXHeight + kBlnBaselineOffset);
234 (*win)->ZoomToRectangle(wbox.left(), wbox.top(),
235 wbox.right(), wbox.bottom());
236 #endif // GRAPHICS_DISABLED
237}
238
239// Learns the given word using its chopped_word, seam_array, denorm,
240// box_word, best_state, and correct_text to learn both correctly and

Callers

nothing calls this directly

Calls 4

PenMethod · 0.80
ZoomToRectangleMethod · 0.80
ClearMethod · 0.45
LineMethod · 0.45

Tested by

no test coverage detected