tesseract  5.0.0-alpha-619-ge9db
render.cpp File Reference
#include "render.h"
#include "blobs.h"
#include <cmath>

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

Function Documentation

◆ display_blob()

void display_blob ( TBLOB blob,
C_COL  color 
)

Definition at line 49 of file render.cpp.

51  {
52  /* Size of drawable */
53  if (blob_window == nullptr) {
54  blob_window = c_create_window ("Blobs", 520, 10,
55  500, 256, -1000.0, 1000.0, 0.0, 256.0);
56  }
57  else {
59  }
60 

◆ render_blob()

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

Definition at line 67 of file render.cpp.

70  {
71  /* No outline */
72  if (!blob)
73  return;

◆ render_edgepts()

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

Definition at line 81 of file render.cpp.

85  {
86  if (!edgept)
87  return;
88 
89  float x = edgept->pos.x;
90  float y = edgept->pos.y;
91  EDGEPT *this_edge = edgept;
92 
93  c_line_color_index(window, color);
94  c_move(window, x, y);
95  do {
96  this_edge = this_edge->next;
97  x = this_edge->pos.x;
98  y = this_edge->pos.y;

◆ render_outline()

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

Definition at line 106 of file render.cpp.

113  {
114  /* No outline */
115  if (!outline)
116  return;
117  /* Draw Compact outline */

Variable Documentation

◆ blob_window

ScrollView* blob_window = nullptr

Definition at line 31 of file render.cpp.

◆ color_list

C_COL color_list[]
Initial value:

Definition at line 33 of file render.cpp.

◆ wordrec_blob_pause

bool wordrec_blob_pause = 0

"Blob pause"

Definition at line 39 of file render.cpp.

◆ wordrec_display_all_blobs

bool wordrec_display_all_blobs = 0

"Display Blobs"

Definition at line 37 of file render.cpp.

blob_window
ScrollView * blob_window
Definition: render.cpp:31
Yellow
Definition: callcpp.h:30
Cyan
Definition: callcpp.h:32
Blue
Definition: callcpp.h:33
c_move
void c_move(void *win, double x, double y)
Definition: callcpp.cpp:71
TPOINT::x
int16_t x
Definition: blobs.h:91
Red
Definition: callcpp.h:29
TPOINT::y
int16_t y
Definition: blobs.h:92
c_clear_window
void c_clear_window(void *win)
Definition: callcpp.cpp:96
White
Definition: callcpp.h:28
c_create_window
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:47
EDGEPT
Definition: blobs.h:97
c_line_color_index
void c_line_color_index(void *win, C_COL index)
Definition: callcpp.cpp:62
Green
Definition: callcpp.h:31
EDGEPT::pos
TPOINT pos
Definition: blobs.h:184
EDGEPT::next
EDGEPT * next
Definition: blobs.h:190