/********************************************************************** * display_blob * * Macro to display blob in a window. **********************************************************************/ void display_blob(TBLOB *blob, C_COL color) { /* Size of drawable */ if (blob_window == NULL) { blob_window = c_create_window ("Blobs", 520, 10, 500, 256, -1000.0, 1000.0, 0.0, 256.0); } else { c_clear_window(blob_window); } render_blob(blob_window, blob, color); }
/********************************************************************** * display_segmentation * * Display all the words on the page into a window. **********************************************************************/ void display_segmentation(TBLOB *chunks, SEARCH_STATE segmentation) { /* If no window create it */ if (segm_window == NULL) { segm_window = c_create_window ("Segmentation", 5, 10, 500, 256, -1000.0, 1000.0, 0.0, 256.0); } else { c_clear_window(segm_window); } render_segmentation(segm_window, chunks, segmentation); /* Put data in the window */ c_make_current(segm_window); }
/********************************************************************** * display_edgepts * * Macro to display edge points in a window. **********************************************************************/ void display_edgepts(LIST outlines) { void *window; /* Set up window */ if (edge_window == NULL) { edge_window = c_create_window ("Edges", 750, 150, 400, 128, -400.0, 400.0, 0.0, 256.0); } else { c_clear_window(edge_window); } /* Render the outlines */ window = edge_window; /* Reclaim old memory */ iterate(outlines) { render_edgepts (window, (EDGEPT *) first_node (outlines), White); } }