[AD] al_draw_bitmap_region flipping |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
What is the intended behaviour of al_draw_bitmap_region with flipping?
I expected it to act as if you had drawn a sub-bitmap of the same
region, but that's not what it does when flipping flags are present.
Tests in attached patch.
Peter
diff --git a/tests/test_bitmaps.ini b/tests/test_bitmaps.ini
index 81ddb46..cc37e93 100644
--- a/tests/test_bitmaps.ini
+++ b/tests/test_bitmaps.ini
@@ -23,6 +23,27 @@ extend=test blit
flags=ALLEGRO_FLIP_VERTICAL|ALLEGRO_FLIP_HORIZONTAL
hash=72d59a18
+[test region]
+op0=al_clear_to_color(red)
+op1=al_draw_bitmap(mysha, 37, 47, flags)
+op2=al_draw_bitmap_region(mysha, 111, 51, 77, 99, 37, 47, flags)
+flags=0
+
+[test region hflip]
+# is this right?
+extend=test region
+flags=ALLEGRO_FLIP_HORIZONTAL
+
+[test region vflip]
+# is this right?
+extend=test region
+flags=ALLEGRO_FLIP_VERTICAL
+
+[test region vhflip]
+# is this right?
+extend=test region
+flags=ALLEGRO_FLIP_HORIZONTAL|ALLEGRO_FLIP_VERTICAL
+
[test scale min]
op0=al_clear_to_color(red)
op1=al_draw_scaled_bitmap(mysha, 0, 0, 320, 200, 11, 17, 77, 99, flags)