Lines 228-233
Link Here
|
228 |
// Clears the window and draws baselines. |
228 |
// Clears the window and draws baselines. |
229 |
void Classify::RefreshDebugWindow(ScrollView **win, const char *msg, |
229 |
void Classify::RefreshDebugWindow(ScrollView **win, const char *msg, |
230 |
int y_offset, const TBOX &wbox) { |
230 |
int y_offset, const TBOX &wbox) { |
|
|
231 |
#ifndef GRAPHICS_DISABLED |
231 |
const int kSampleSpaceWidth = 500; |
232 |
const int kSampleSpaceWidth = 500; |
232 |
if (*win == NULL) { |
233 |
if (*win == NULL) { |
233 |
*win = new ScrollView(msg, 100, y_offset, kSampleSpaceWidth * 2, 200, |
234 |
*win = new ScrollView(msg, 100, y_offset, kSampleSpaceWidth * 2, 200, |
Lines 241-246
Link Here
|
241 |
kSampleSpaceWidth, kBlnXHeight + kBlnBaselineOffset); |
242 |
kSampleSpaceWidth, kBlnXHeight + kBlnBaselineOffset); |
242 |
(*win)->ZoomToRectangle(wbox.left(), wbox.top(), |
243 |
(*win)->ZoomToRectangle(wbox.left(), wbox.top(), |
243 |
wbox.right(), wbox.bottom()); |
244 |
wbox.right(), wbox.bottom()); |
|
|
245 |
#endif // GRAPHICS_DISABLED |
244 |
} |
246 |
} |
245 |
|
247 |
|
246 |
// Learns the given word using its chopped_word, seam_array, denorm, |
248 |
// Learns the given word using its chopped_word, seam_array, denorm, |
Lines 276-281
Link Here
|
276 |
int start_blob = 0; |
278 |
int start_blob = 0; |
277 |
char prev_map_char = '0'; |
279 |
char prev_map_char = '0'; |
278 |
|
280 |
|
|
|
281 |
#ifndef GRAPHICS_DISABLED |
279 |
if (classify_debug_character_fragments) { |
282 |
if (classify_debug_character_fragments) { |
280 |
if (learn_fragmented_word_debug_win_ != NULL) { |
283 |
if (learn_fragmented_word_debug_win_ != NULL) { |
281 |
window_wait(learn_fragmented_word_debug_win_); |
284 |
window_wait(learn_fragmented_word_debug_win_); |
Lines 287-292
Link Here
|
287 |
word->chopped_word->plot(learn_fragmented_word_debug_win_); |
290 |
word->chopped_word->plot(learn_fragmented_word_debug_win_); |
288 |
ScrollView::Update(); |
291 |
ScrollView::Update(); |
289 |
} |
292 |
} |
|
|
293 |
#endif // GRAPHICS_DISABLED |
290 |
|
294 |
|
291 |
for (int ch = 0; ch < word_len; ++ch) { |
295 |
for (int ch = 0; ch < word_len; ++ch) { |
292 |
if (classify_debug_character_fragments) { |
296 |
if (classify_debug_character_fragments) { |
Lines 410-415
Link Here
|
410 |
if (rotated_blob == NULL) |
414 |
if (rotated_blob == NULL) |
411 |
rotated_blob = blob; |
415 |
rotated_blob = blob; |
412 |
|
416 |
|
|
|
417 |
#ifndef GRAPHICS_DISABLED |
413 |
// Draw debug windows showing the blob that is being learned if needed. |
418 |
// Draw debug windows showing the blob that is being learned if needed. |
414 |
if (strcmp(classify_learn_debug_str.string(), correct_text) == 0) { |
419 |
if (strcmp(classify_learn_debug_str.string(), correct_text) == 0) { |
415 |
RefreshDebugWindow(&learn_debug_win_, "LearnPieces", 600, |
420 |
RefreshDebugWindow(&learn_debug_win_, "LearnPieces", 600, |
Lines 424-429
Link Here
|
424 |
ScrollView::BLUE, ScrollView::BROWN); |
429 |
ScrollView::BLUE, ScrollView::BROWN); |
425 |
learn_fragments_debug_win_->Update(); |
430 |
learn_fragments_debug_win_->Update(); |
426 |
} |
431 |
} |
|
|
432 |
#endif // GRAPHICS_DISABLED |
427 |
|
433 |
|
428 |
if (filename != NULL) { |
434 |
if (filename != NULL) { |
429 |
classify_norm_method.set_value(character); // force char norm spc 30/11/93 |
435 |
classify_norm_method.set_value(character); // force char norm spc 30/11/93 |