Skip to content

Commit

Permalink
rounding float point numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
coolwanglu committed Sep 14, 2012
1 parent ec57ec7 commit 4d996a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/HTMLRenderer/LineBuffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4d996a1

Please sign in to comment.