tesseract  4.0.0-1-g2a2b
tesseract::TessOsdRenderer Class Reference

#include <renderer.h>

Inheritance diagram for tesseract::TessOsdRenderer:
tesseract::TessResultRenderer

Public Member Functions

 TessOsdRenderer (const char *outputbase)
 
- Public Member Functions inherited from tesseract::TessResultRenderer
virtual ~TessResultRenderer ()
 
void insert (TessResultRenderer *next)
 
TessResultRenderernext ()
 
bool BeginDocument (const char *title)
 
bool AddImage (TessBaseAPI *api)
 
bool EndDocument ()
 
const char * file_extension () const
 
const char * title () const
 
bool happy ()
 
int imagenum () const
 

Protected Member Functions

virtual bool AddImageHandler (TessBaseAPI *api)
 
- Protected Member Functions inherited from tesseract::TessResultRenderer
 TessResultRenderer (const char *outputbase, const char *extension)
 
virtual bool BeginDocumentHandler ()
 
virtual bool EndDocumentHandler ()
 
void AppendString (const char *s)
 
void AppendData (const char *s, int len)
 

Detailed Description

Renders tesseract output into an osd text string

Definition at line 250 of file renderer.h.

Constructor & Destructor Documentation

◆ TessOsdRenderer()

tesseract::TessOsdRenderer::TessOsdRenderer ( const char *  outputbase)
explicit

Definition at line 265 of file renderer.cpp.

266  : TessResultRenderer(outputbase, "osd") {}
TessResultRenderer(const char *outputbase, const char *extension)
Definition: renderer.cpp:33

Member Function Documentation

◆ AddImageHandler()

bool tesseract::TessOsdRenderer::AddImageHandler ( TessBaseAPI api)
protectedvirtual

Implements tesseract::TessResultRenderer.

Definition at line 268 of file renderer.cpp.

268  {
269  char* osd = api->GetOsdText(imagenum());
270  if (osd == nullptr) return false;
271 
272  AppendString(osd);
273  delete[] osd;
274 
275  return true;
276 }
void AppendString(const char *s)
Definition: renderer.cpp:102

The documentation for this class was generated from the following files: