1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-04 17:18:40 +00:00

rounding float point numbers

This commit is contained in:
Lu Wang 2012-09-14 15:19:53 +08:00
parent ec57ec7ef3
commit 4d996a14a3

View File

@ -80,7 +80,11 @@ void HTMLRenderer::LineBuffer::flush(void)
// TODO: class for height ?
ostream & out = renderer->html_fout;
out << "<div style=\"left:" << x << "px;bottom:" << y << "px;height:" << max_ascent << "px;\" class=\"l t" << tm_id << "\">";
out << "<div style=\"left:"
<< _round(x) << "px;bottom:"
<< _round(y) << "px;height:"
<< _round(max_ascent) << "px;\" class=\"l t"
<< tm_id << "\">";
auto cur_state_iter = states.begin();
auto cur_offset_iter = offsets.begin();