It says in the code // negative size allows for flipping
Which is a welcome feature. My problem is when I do use a negative height the texture is not only flipped but also shifted one pixel.
Looking at the TextureAreaBase constuctor:
Code:
54 if(width == 1) {
55 fx += 0.5f;
56 width = 0;
57 } else if(width < -1) {
58 fx -= width + 1;
59 }
60 if(height == 1) {
61 fy += 0.5f;
62 height = 0;
63 } else if(height < -1) {
64 fy -= height + 1;
65 }
I ask myself why do you shift fx and fy one pixel when using negative values?
Changing line 64 to fy -= height; gives me expected result.
Is there some reason +1 are added to fx and fy?