Add right padding as mirror of left padding.

This commit is contained in:
Fabien Freling 2014-08-06 23:22:02 +02:00
parent eb710efc68
commit 237ed00689

View file

@ -588,8 +588,8 @@ Image* rotate(Image const& src, double angle)
// TODO: compact these structure to increase locality
int const left_padding = padding_table[y];
int const left_border = 0;
int const right_padding = 0;
int const right_border = 0;
int const right_padding = min((int) padding_table[height - 1 - y], (int) width - left_padding);
int const core_pixels = width - left_padding - left_border - right_border - right_padding;
if (false)