Esempio n. 1
0
/**********************************************************************
 * render_outline
 *
 * Create a list of line segments that represent the expanded outline
 * that was supplied as input.
 **********************************************************************/
void render_outline(void *window,
                    TESSLINE *outline,
                    C_COL color) {
  /* No outline */
  if (!outline)
    return;
  /* Draw Compact outline */
  if (outline->loop)
    render_edgepts (window, outline->loop, color);
  /* Add on next outlines */
  render_outline (window, outline->next, color);
}
Esempio n. 2
0
/**********************************************************************
 * 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);
  }
}