Skip to content

Commit

Permalink
Static cast instead of multiplication
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Nov 24, 2019
1 parent 1bb2fda commit 1275823
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/object/text_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ TextObject::draw(DrawingContext& context)

float width = m_font->get_text_width(m_wrapped_text) + 20.0f;
float height = m_font->get_text_height(m_wrapped_text) + 20.0f;
Vector spos = m_pos + get_anchor_pos(Rectf(0, 0, static_cast<float>(context.get_width()), static_cast<float>((context.get_height() * 1.0f) + SCREEN_HEIGHT - 340.0f)),
Vector spos = m_pos + get_anchor_pos(Rectf(0, 0, static_cast<float>(context.get_width()), static_cast<float>(context.get_height() + SCREEN_HEIGHT) - 340.0f),
width, height, m_anchor);

context.color().draw_filled_rect(Rectf(spos, Sizef(width, height)),
Expand Down

0 comments on commit 1275823

Please sign in to comment.