@@ -282,27 +282,31 @@ double Network::Random(double range) {
282
282
return randomizer_->SignedRand (range);
283
283
}
284
284
285
- #ifndef GRAPHICS_DISABLED
286
285
// === Debug image display methods. ===
287
286
// Displays the image of the matrix to the forward window.
288
287
void Network::DisplayForward (const NetworkIO& matrix) {
288
+ #ifndef GRAPHICS_DISABLED // do nothing if there's no graphics
289
289
Pix* image = matrix.ToPix ();
290
290
ClearWindow (false , name_.string (), pixGetWidth (image),
291
291
pixGetHeight (image), &forward_win_);
292
292
DisplayImage (image, forward_win_);
293
293
forward_win_->Update ();
294
+ #endif // GRAPHICS_DISABLED
294
295
}
295
296
296
297
// Displays the image of the matrix to the backward window.
297
298
void Network::DisplayBackward (const NetworkIO& matrix) {
299
+ #ifndef GRAPHICS_DISABLED // do nothing if there's no graphics
298
300
Pix* image = matrix.ToPix ();
299
301
STRING window_name = name_ + " -back" ;
300
302
ClearWindow (false , window_name.string (), pixGetWidth (image),
301
303
pixGetHeight (image), &backward_win_);
302
304
DisplayImage (image, backward_win_);
303
305
backward_win_->Update ();
306
+ #endif // GRAPHICS_DISABLED
304
307
}
305
308
309
+ #ifndef GRAPHICS_DISABLED
306
310
// Creates the window if needed, otherwise clears it.
307
311
void Network::ClearWindow (bool tess_coords, const char * window_name,
308
312
int width, int height, ScrollView** window) {
0 commit comments