Tesseract  3.02
tesseract-ocr/wordrec/render.cpp File Reference
#include "render.h"
#include "blobs.h"
#include <assert.h>
#include <math.h>
#include "vecfuncs.h"

Go to the source code of this file.

Functions

void display_blob (TBLOB *blob, C_COL color)
void render_blob (void *window, TBLOB *blob, C_COL color)
void render_edgepts (void *window, EDGEPT *edgept, C_COL color)
void render_outline (void *window, TESSLINE *outline, C_COL color)

Variables

ScrollViewblob_window = NULL
C_COL color_list []
bool wordrec_display_all_blobs = 0
bool wordrec_display_all_words = 0
bool wordrec_blob_pause = 0

Function Documentation

void display_blob ( TBLOB blob,
C_COL  color 
)

Definition at line 64 of file render.cpp.

                                            {
  /* 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);
}
void render_blob ( void *  window,
TBLOB blob,
C_COL  color 
)

Definition at line 83 of file render.cpp.

                                                         {
  /* No outline */
  if (!blob)
    return;

  render_outline (window, blob->outlines, color);
}
void render_edgepts ( void *  window,
EDGEPT edgept,
C_COL  color 
)

Definition at line 98 of file render.cpp.

                                                               {
  float x = edgept->pos.x;
  float y = edgept->pos.y;
  EDGEPT *this_edge = edgept;

  if (!edgept)
    return;

  c_line_color_index(window, color);
  c_move(window, x, y);
  do {
    this_edge = this_edge->next;
    x = this_edge->pos.x;
    y = this_edge->pos.y;
    c_draw(window, x, y);
  }
  while (edgept != this_edge);
}
void render_outline ( void *  window,
TESSLINE outline,
C_COL  color 
)

Definition at line 124 of file render.cpp.

                                 {
  /* 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);
}

Variable Documentation

Definition at line 43 of file render.cpp.

Initial value:

Definition at line 45 of file render.cpp.

"Blob pause"

Definition at line 53 of file render.cpp.

"Display Blobs"

Definition at line 49 of file render.cpp.

"Display Words"

Definition at line 51 of file render.cpp.