fix(renderer): Content shifting bounds

This commit is contained in:
Michael Carlberg 2016-12-31 03:00:53 +01:00
parent a59d892d0b
commit a989d401d9
1 changed files with 6 additions and 0 deletions

View File

@ -426,6 +426,12 @@ const vector<action_block> renderer::get_actions() {
* Shift pixmap content by given value
*/
int16_t renderer::shift_content(int16_t x, const int16_t shift_x) {
if (x > m_rect.width) {
return m_rect.width;
} else if (x < 0) {
return 0;
}
m_log.trace_x("renderer: shift_content(%i)", shift_x);
int16_t base_x{0};