tesseract  4.0.0-1-g2a2b
render.h File Reference
#include "callcpp.h"
#include "params.h"

Go to the source code of this file.

Macros

#define NUM_COLORS   6
 

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
 
C_COL color_list []
 
bool wordrec_display_all_blobs = 0
 
bool wordrec_display_all_words = 0
 
bool wordrec_blob_pause = 0
 

Macro Definition Documentation

◆ NUM_COLORS

#define NUM_COLORS   6

Definition at line 49 of file render.h.

Function Documentation

◆ display_blob()

void display_blob ( TBLOB blob,
C_COL  color 
)

Definition at line 61 of file render.cpp.

61  {
62  /* Size of drawable */
63  if (blob_window == nullptr) {
64  blob_window = c_create_window ("Blobs", 520, 10,
65  500, 256, -1000.0, 1000.0, 0.0, 256.0);
66  }
67  else {
69  }
70 
71  render_blob(blob_window, blob, color);
72 }
ScrollView * blob_window
Definition: render.cpp:40
void render_blob(void *window, TBLOB *blob, C_COL color)
Definition: render.cpp:80
void c_clear_window(void *win)
Definition: callcpp.cpp:97
ScrollView * c_create_window(const char *name, int16_t xpos, int16_t ypos, int16_t xsize, int16_t ysize, double xmin, double xmax, double ymin, double ymax)
Definition: callcpp.cpp:48

◆ render_blob()

void render_blob ( void *  window,
TBLOB blob,
C_COL  color 
)

Definition at line 80 of file render.cpp.

80  {
81  /* No outline */
82  if (!blob)
83  return;
84 
85  render_outline (window, blob->outlines, color);
86 }
void render_outline(void *window, TESSLINE *outline, C_COL color)
Definition: render.cpp:121
TESSLINE * outlines
Definition: blobs.h:384

◆ render_edgepts()

void render_edgepts ( void *  window,
EDGEPT edgept,
C_COL  color 
)

Definition at line 95 of file render.cpp.

95  {
96  if (!edgept)
97  return;
98 
99  float x = edgept->pos.x;
100  float y = edgept->pos.y;
101  EDGEPT *this_edge = edgept;
102 
103  c_line_color_index(window, color);
104  c_move(window, x, y);
105  do {
106  this_edge = this_edge->next;
107  x = this_edge->pos.x;
108  y = this_edge->pos.y;
109  c_draw(window, x, y);
110  }
111  while (edgept != this_edge);
112 }
TPOINT pos
Definition: blobs.h:170
void c_draw(void *win, double x, double y)
Definition: callcpp.cpp:81
void c_move(void *win, double x, double y)
Definition: callcpp.cpp:72
Definition: blobs.h:83
int16_t x
Definition: blobs.h:78
int16_t y
Definition: blobs.h:79
EDGEPT * next
Definition: blobs.h:176
void c_line_color_index(void *win, C_COL index)
Definition: callcpp.cpp:63

◆ render_outline()

void render_outline ( void *  window,
TESSLINE outline,
C_COL  color 
)

Definition at line 121 of file render.cpp.

123  {
124  /* No outline */
125  if (!outline)
126  return;
127  /* Draw Compact outline */
128  if (outline->loop)
129  render_edgepts (window, outline->loop, color);
130  /* Add on next outlines */
131  render_outline (window, outline->next, color);
132 }
TESSLINE * next
Definition: blobs.h:265
void render_edgepts(void *window, EDGEPT *edgept, C_COL color)
Definition: render.cpp:95
void render_outline(void *window, TESSLINE *outline, C_COL color)
Definition: render.cpp:121
EDGEPT * loop
Definition: blobs.h:264

Variable Documentation

◆ blob_window

ScrollView* blob_window

Definition at line 40 of file render.cpp.

◆ color_list

C_COL color_list[]

Definition at line 42 of file render.cpp.

◆ wordrec_blob_pause

bool wordrec_blob_pause = 0

"Blob pause"

Definition at line 50 of file render.cpp.

◆ wordrec_display_all_blobs

bool wordrec_display_all_blobs = 0

"Display Blobs"

Definition at line 46 of file render.cpp.

◆ wordrec_display_all_words

bool wordrec_display_all_words = 0

"Display Words"

Definition at line 48 of file render.cpp.