Skip to content

Commit

Permalink
GUI2/Canvas: fixed mirrored images being flipped on the wrong axis.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Mar 13, 2018
1 parent 2e5fafc commit 7674a0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/core/canvas.cpp
Expand Up @@ -1161,7 +1161,8 @@ void image_shape::draw(
surf = image_;
}

const bool flip_v = vertical_mirror_(local_variables);
// Flip on the vertical axis - ie, a horizontal flip.
const bool mirror = vertical_mirror_(local_variables);

dst_clip.w = w ? w : surf->w;
dst_clip.h = h ? h : surf->h;
Expand All @@ -1174,7 +1175,7 @@ void image_shape::draw(
*/
texture txt(surf);

CVideo::get_singleton().render_copy(txt, nullptr, &dst_clip, false, flip_v);
CVideo::get_singleton().render_copy(txt, nullptr, &dst_clip, mirror, false);
}

image_shape::resize_mode image_shape::get_resize_mode(const std::string& resize_mode)
Expand Down

0 comments on commit 7674a0e

Please sign in to comment.