20 #include "config_auto.h"
27 #define TO_WIN_XPOS 0 //default window pos
29 #define TO_WIN_NAME "Textord"
33 "Draw fixed pitch cell boundaries");
42 #ifndef GRAPHICS_DISABLED
47 page_tr.
x() + 1, page_tr.
y() + 1,
48 page_tr.
x(), page_tr.
y(),
true);
72 BLOBNBOX_IT it = list;
74 win->
Pen(body_colour);
76 for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
77 it.data ()->bounding_box ().plot (win);
102 left = it.data ()->bounding_box ().left ();
104 right = it.data ()->bounding_box ().right ();
108 plot_pt.
rotate (rotation);
111 plot_pt.
rotate (rotation);
132 auto fleft = static_cast<float>(left);
137 right = it.data ()->bounding_box ().right ();
140 plot_pt =
FCOORD (fleft, gradient * left + row->
max_y ());
141 plot_pt.
rotate (rotation);
143 plot_pt =
FCOORD (fleft, gradient * left + row->
min_y ());
144 plot_pt.
rotate (rotation);
147 plot_pt.
rotate (rotation);
150 plot_pt.
rotate (rotation);
167 int32_t max_y, int32_t occupation[],
172 auto fleft = static_cast<float>(xleft);
177 for (line_index = min_y; line_index <= max_y; line_index++) {
178 if (occupation[line_index - min_y] < thresholds[line_index - min_y]) {
190 to_win->
DrawTo(fleft + occupation[line_index - min_y] / 10.0, static_cast<float>(line_index));
195 for (line_index = min_y; line_index <= max_y; line_index++) {
196 to_win->
DrawTo(fleft + thresholds[line_index - min_y] / 10.0, static_cast<float>(line_index));
216 TO_ROW_IT row_it = block->
get_rows ();
221 for (row_it.mark_cycle_pt (); !row_it.cycled_list (); row_it.forward ()) {
222 row = row_it.data ();
224 blob_it.move_to_last ();
225 right = blob_it.data ()->bounding_box ().right ();
227 FCOORD (static_cast<float>(left),
229 plot_pt.
rotate (rotation);
234 plot_pt.
rotate (rotation);
260 BLOBNBOX_IT start_it = blob_it;
265 for (blob_it.mark_cycle_pt (); !blob_it.cycled_list (); blob_it.forward ()) {
266 blob = blob_it.data ();
284 colour = static_cast<ScrollView::Color>(colour + 1);
291 win->
Brush(rect_colour);
293 blob_box.
left (), blob_box.
top ());
297 prev_x = blob_box.
right();
298 if (blob->
cblob () !=
nullptr)
299 blob->
cblob ()->
plot (win, colour, colour);
320 BLOBNBOX_IT *blob_it,
324 int16_t projection_left,
325 int16_t projection_right,
326 float projection_scale) {
329 FPSEGPT_LIST seg_list;
333 if (pitsync_linear_version)
335 projection_left, projection_right,
336 projection_scale, occupation, &seg_list, 0, 0);
339 word_box = blob_it->data ()->bounding_box ();
340 for (; blob_count > 0; blob_count--)
342 seg_it.set_to_list (&seg_list);
343 for (seg_it.mark_cycle_pt (); !seg_it.cycled_list (); seg_it.forward ()) {
344 segpt = seg_it.data ();
365 FPSEGPT_LIST *seg_list
368 FPSEGPT_IT seg_it = seg_list;
373 word_box = blob_it.data ()->bounding_box ();
374 for (blob_it.mark_cycle_pt (); !blob_it.cycled_list ();)
376 for (seg_it.mark_cycle_pt (); !seg_it.cycled_list (); seg_it.forward ()) {
377 segpt = seg_it.data ();
399 ICOORDELT_LIST *cells
402 ICOORDELT_IT cell_it = cells;
407 word_box = blob_it.data ()->bounding_box ();
408 for (blob_it.mark_cycle_pt (); !blob_it.cycled_list ();)
411 for (cell_it.mark_cycle_pt (); !cell_it.cycled_list (); cell_it.forward ()) {
412 cell = cell_it.data ();
413 win->
Line(cell->
x () + xshift, word_box.
bottom (), cell->
x () + xshift, word_box.
top ());
417 #endif // GRAPHICS_DISABLED