#include "host.h"
#include "callcpp.h"
#include "tessclas.h"
Go to the source code of this file.
#define NUM_COLORS 6 |
Only used in render_segmentation()
Definition at line 42 of file render.h.
Referenced by render_segmentation().
Macro to display blob in a window.
Definition at line 59 of file render.cpp.
References blob_origin(), blob_window, c_clear_window(), c_create_window(), c_make_current(), NULL, and render_blob().
Referenced by attempt_blob_chop(), and form_two_blobs().
00059 { 00060 void *window; 00061 TPOINT origin; 00062 /* Size of drawable */ 00063 if (blob_window == NULL) { 00064 blob_window = c_create_window ("Blobs", 520, 10, 00065 500, 128, -1000.0, 1000.0, 0.0, 256.0); 00066 } 00067 else { 00068 c_clear_window(blob_window); 00069 } 00070 00071 window = blob_window; 00072 /* Render blob */ 00073 blob_origin(blob, &origin); 00074 00075 render_blob(window, blob, origin, color); 00076 /* Default zoom */ 00077 c_make_current(window); 00078 }
void init_render_vars | ( | ) |
Initialize the render graphics menu items.
Definition at line 85 of file render.cpp.
Referenced by init_ms_debug().
Create a list of line segments that represent the expanded outline that was supplied as input.
Definition at line 97 of file render.cpp.
References blobstruct::outlines, and render_outline().
Referenced by display_blob().
00097 { 00098 /* No outline */ 00099 if (!blob) 00100 return; 00101 00102 render_outline (window, blob->outlines, origin, color); 00103 }
Create a list of line segments that represent the expanded outline that was supplied as input.
Definition at line 111 of file render.cpp.
References c_draw(), c_line_color_index(), c_move(), edgeptstruct::next, edgeptstruct::pos, TPOINT::x, and TPOINT::y.
Referenced by display_edgepts(), and render_outline().
00111 { 00112 float x = edgept->pos.x; 00113 float y = edgept->pos.y; 00114 EDGEPT *this_edge = edgept; 00115 00116 if (!edgept) 00117 return; 00118 00119 c_line_color_index(window, color); 00120 c_move(window, x, y); 00121 do { 00122 this_edge = this_edge->next; 00123 x = this_edge->pos.x; 00124 y = this_edge->pos.y; 00125 c_draw(window, x, y); 00126 } 00127 while (edgept != this_edge); 00128 }
Create a list of line segments that represent the expanded outline that was supplied as input.
Definition at line 136 of file render.cpp.
References olinestruct::child, Grey, olinestruct::loop, olinestruct::next, render_edgepts(), and render_outline().
Referenced by render_blob(), render_outline(), and render_segmentation().
00139 { 00140 /* No outline */ 00141 if (!outline) 00142 return; 00143 /* Draw Compact outline */ 00144 if (outline->loop) 00145 render_edgepts (window, outline->loop, color); 00146 /* Add on next outlines */ 00147 render_outline (window, outline->next, origin, color); 00148 00149 /* Add on child outlines */ 00150 render_outline (window, outline->child, origin, Grey); 00151 }
int blob_pause |
Wait after each blob
void* blob_window |
* (c) Copyright 1989, Hewlett-Packard Company. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License.
Definition at line 34 of file render.cpp.
Referenced by display_blob().
Display blobs ?
Display words ?