All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
tesseract::TessBoxTextRenderer Class Reference

#include <renderer.h>

Inheritance diagram for tesseract::TessBoxTextRenderer:

Public Member Functions

 TessBoxTextRenderer (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
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 a plain UTF-8 text string

Definition at line 216 of file renderer.h.

Constructor & Destructor Documentation

tesseract::TessBoxTextRenderer::TessBoxTextRenderer ( const char *  outputbase)

Definition at line 202 of file renderer.cpp.

203  : TessResultRenderer(outputbase, "box") {
204 }
TessResultRenderer(const char *outputbase, const char *extension)
Definition: renderer.cpp:16

Member Function Documentation

bool tesseract::TessBoxTextRenderer::AddImageHandler ( TessBaseAPI api)

Implements tesseract::TessResultRenderer.

Definition at line 206 of file renderer.cpp.

206  {
207  char* text = api->GetBoxText(imagenum());
208  if (text == NULL) return false;
210  AppendString(text);
211  delete[] text;
213  return true;
214 }
void AppendString(const char *s)
Definition: renderer.cpp:83
#define NULL
Definition: host.h:144

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