Definition at line 43 of file stringrenderer_test.cc.
◆ DisplayClusterBoxes()
void tesseract::StringRendererTest::DisplayClusterBoxes |
( |
Image |
pix | ) |
|
|
inlineprotected |
Definition at line 63 of file stringrenderer_test.cc.
63 {
64 if (!FLAGS_display) {
65 return;
66 }
67 const std::vector<BoxChar *> &boxchars =
renderer_->GetBoxes();
68 Boxa *boxes = boxaCreate(0);
69 for (const auto &boxchar : boxchars) {
70 if (boxchar->box()) {
71 boxaAddBox(boxes, const_cast<Box *>(boxchar->box()), L_CLONE);
72 }
73 }
74 Image box_pix = pixDrawBoxaRandom(pix, boxes, 1);
75 boxaDestroy(&boxes);
76 pixDisplay(box_pix, 0, 0);
77 box_pix.destroy();
78 }
std::unique_ptr< StringRenderer > renderer_
◆ SetUp()
void tesseract::StringRendererTest::SetUp |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
Reimplemented from testing::Test.
Definition at line 45 of file stringrenderer_test.cc.
45 {
46 if (!font_map) {
47 font_map = pango_cairo_font_map_new_for_font_type(CAIRO_FONT_TYPE_FT);
48 }
49 pango_cairo_font_map_set_default(PANGO_CAIRO_FONT_MAP(font_map));
50 }
◆ SetUpTestCase()
static void tesseract::StringRendererTest::SetUpTestCase |
( |
| ) |
|
|
inlinestaticprotected |
Definition at line 52 of file stringrenderer_test.cc.
52 {
53 static std::locale system_locale("");
54 std::locale::global(system_locale);
55
56 l_chooseDisplayProg(L_DISPLAY_WITH_XZGV);
57 FLAGS_fonts_dir = TESTING_DIR;
58 FLAGS_fontconfig_tmpdir = FLAGS_test_tmpdir;
61 }
static void SoftInitFontConfig()
◆ renderer_
std::unique_ptr<StringRenderer> tesseract::StringRendererTest::renderer_ |
|
protected |
The documentation for this class was generated from the following file: