MCPcopy Create free account
hub / github.com/creatale/node-dv / plot

Method plot

deps/tesseract/ccstruct/polyblk.cpp:245–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244#ifndef GRAPHICS_DISABLED
245void POLY_BLOCK::plot(ScrollView* window, inT32 num) {
246 ICOORDELT_IT v = &vertices;
247
248 window->Pen(ColorForPolyBlockType(type));
249
250 v.move_to_first ();
251
252 if (num > 0) {
253 window->TextAttributes("Times", 80, false, false, false);
254 char temp_buff[34];
255 #if defined(__UNIX__) || defined(MINGW)
256 sprintf(temp_buff, INT32FORMAT, num);
257 #else
258 ltoa (num, temp_buff, 10);
259 #endif
260 window->Text(v.data ()->x (), v.data ()->y (), temp_buff);
261 }
262
263 window->SetCursor(v.data ()->x (), v.data ()->y ());
264 for (v.mark_cycle_pt (); !v.cycled_list (); v.forward ()) {
265 window->DrawTo(v.data ()->x (), v.data ()->y ());
266 }
267 v.move_to_first ();
268 window->DrawTo(v.data ()->x (), v.data ()->y ());
269}
270
271
272void POLY_BLOCK::fill(ScrollView* window, ScrollView::Color colour) {

Callers

nothing calls this directly

Calls 12

PenMethod · 0.80
TextAttributesMethod · 0.80
TextMethod · 0.80
dataMethod · 0.80
SetCursorMethod · 0.80
DrawToMethod · 0.80
move_to_firstMethod · 0.45
xMethod · 0.45
yMethod · 0.45
mark_cycle_ptMethod · 0.45
cycled_listMethod · 0.45
forwardMethod · 0.45

Tested by

no test coverage detected