Skip to content

Commit 151787e

Browse files
committed
update drawString
1 parent c898421 commit 151787e

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

pdf2htmlEX/src/HTMLRenderer/HTMLRenderer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ struct HTMLRenderer : OutputDev
156156
void eoClip(GfxState * state) override;
157157
void clipToStrokePath(GfxState * state) override;
158158

159-
void drawString(GfxState * state, const GooString * s) override;
159+
void drawString(GfxState * state, const std::string& s) override;
160160

161161
void drawImage(GfxState * state, Object * ref, Stream * str,
162162
int width, int height, GfxImageColorMap * colorMap,

pdf2htmlEX/src/HTMLRenderer/text.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ using std::none_of;
2323
using std::cerr;
2424
using std::endl;
2525

26-
void HTMLRenderer::drawString(GfxState * state, const GooString * s)
26+
void HTMLRenderer::drawString(GfxState * state, const std::string& s)
2727
{
28-
if(s->empty())
28+
if(s.empty())
2929
return;
3030

3131
auto font = state->getFont();
@@ -58,8 +58,8 @@ void HTMLRenderer::drawString(GfxState * state, const GooString * s)
5858

5959
// Now ready to output
6060
// get the unicodes
61-
const char *p = s->c_str();
62-
int len = s->size();
61+
const char *p = s.c_str();
62+
int len = s.size();
6363

6464
//accumulated displacement of chars in this string, in text object space
6565
double dx = 0;

0 commit comments

Comments
 (0)