1. -- 
  2. -- Copyright (c) 2013 Kevin Wellwood 
  3. -- All rights reserved. 
  4. -- 
  5. -- This source code is distributed under the Modified BSD License. For terms and 
  6. -- conditions, see license.txt. 
  7. -- 
  8.  
  9. -- Allegro 5.0.9 - Bitmap routines - Bitmap drawing operations 
  10. package Allegro.Bitmaps.Drawing is 
  11.  
  12.     -- Drawing 
  13.  
  14.     subtype Draw_Flags is Unsigned_32; 
  15.     ALLEGRO_FLIP_HORIZONTAL : constant Draw_Flags; 
  16.     ALLEGRO_FLIP_VERTICAL   : constant Draw_Flags; 
  17.  
  18.     procedure Al_Draw_Bitmap( bitmap : A_Allegro_Bitmap; 
  19.                               dx, dy : Float; 
  20.                               flags  : Draw_Flags ); 
  21.     pragma Import( C, Al_Draw_Bitmap, "al_draw_bitmap" ); 
  22.  
  23.     procedure Al_Draw_Tinted_Bitmap( bitmap : A_Allegro_Bitmap; 
  24.                                      tint   : Allegro_Color; 
  25.                                      dx, dy : Float; 
  26.                                      flags  : Draw_Flags ); 
  27.     pragma Import( C, Al_Draw_Tinted_Bitmap, "al_draw_tinted_bitmap" ); 
  28.  
  29.     procedure Al_Draw_Bitmap_Region( bitmap : A_Allegro_Bitmap; 
  30.                                      sx, sy : Float; 
  31.                                      sw, sh : Float; 
  32.                                      dx, dy : Float; 
  33.                                      flags  : Draw_Flags ); 
  34.     pragma Import( C, Al_Draw_Bitmap_Region, "al_draw_bitmap_region" ); 
  35.  
  36.     procedure Al_Draw_Tinted_Bitmap_Region( bitmap : A_Allegro_Bitmap; 
  37.                                             tint   : Allegro_Color; 
  38.                                             sx, sy : Float; 
  39.                                             sw, sh : Float; 
  40.                                             dx, dy : Float; 
  41.                                             flags  : Draw_Flags ); 
  42.     pragma Import( C, Al_Draw_Tinted_Bitmap_Region, "al_draw_tinted_bitmap_region" ); 
  43.  
  44.     procedure Al_Draw_Rotated_Bitmap( bitmap : A_Allegro_Bitmap; 
  45.                                       cx, cy : Float; 
  46.                                       dx, dy : Float; 
  47.                                       angle  : Float; 
  48.                                       flags  : Draw_Flags ); 
  49.     pragma Import( C, Al_Draw_Rotated_Bitmap, "al_draw_rotated_bitmap" ); 
  50.  
  51.     procedure Al_Draw_Tinted_Rotated_Bitmap( bitmap : A_Allegro_Bitmap; 
  52.                                              tint   : Allegro_Color; 
  53.                                              cx, cy : Float; 
  54.                                              dx, dy : Float; 
  55.                                              angle  : Float; 
  56.                                              flags  : Draw_Flags ); 
  57.     pragma Import( C, Al_Draw_Tinted_Rotated_Bitmap, "al_draw_tinted_rotated_bitmap" ); 
  58.  
  59.     procedure Al_Draw_Scaled_Rotated_Bitmap( bitmap : A_Allegro_Bitmap; 
  60.                                              cx, cy : Float; 
  61.                                              dx, dy : Float; 
  62.                                              xscale, 
  63.                                              yscale : Float; 
  64.                                              angle  : Float; 
  65.                                              flags  : Draw_Flags ); 
  66.     pragma Import( C, Al_Draw_Scaled_Rotated_Bitmap, "al_draw_scaled_rotated_bitmap" ); 
  67.  
  68.     procedure Al_Draw_Tinted_Scaled_Rotated_Bitmap( bitmap : A_Allegro_Bitmap; 
  69.                                                     tint   : Allegro_Color; 
  70.                                                     cx, cy : Float; 
  71.                                                     dx, dy : Float; 
  72.                                                     xscale, 
  73.                                                     yscale : Float; 
  74.                                                     angle  : Float; 
  75.                                                     flags  : Draw_Flags ); 
  76.     pragma Import( C, Al_Draw_Tinted_Scaled_Rotated_Bitmap, "al_draw_tinted_scaled_rotated_bitmap" ); 
  77.  
  78.     procedure Al_Draw_Tinted_Scaled_Rotated_Bitmap_Region( bitmap : A_Allegro_Bitmap; 
  79.                                                            sx, sy : Float; 
  80.                                                            sw, wh : Float; 
  81.                                                            tint   : Allegro_Color; 
  82.                                                            cx, cy : Float; 
  83.                                                            dx, dy : Float; 
  84.                                                            xscale, 
  85.                                                            yscale : Float; 
  86.                                                            angle  : Float; 
  87.                                                            flags  : Draw_Flags ); 
  88.     pragma Import( C, Al_Draw_Tinted_Scaled_Rotated_Bitmap_Region, "al_draw_tinted_scaled_rotated_bitmap_region" ); 
  89.  
  90.     procedure Al_Draw_Scaled_Bitmap( bitmap : A_Allegro_Bitmap; 
  91.                                      sx, sy : Float; 
  92.                                      sw, sh : Float; 
  93.                                      dx, dy : Float; 
  94.                                      dw, dh : Float; 
  95.                                      flags  : Draw_Flags ); 
  96.     pragma Import( C, Al_Draw_Scaled_Bitmap, "al_draw_scaled_bitmap" ); 
  97.  
  98.     procedure Al_Draw_Tinted_Scaled_Bitmap( bitmap : A_Allegro_Bitmap; 
  99.                                             tint   : Allegro_Color; 
  100.                                             sx, sy : Float; 
  101.                                             sw, sh : Float; 
  102.                                             dx, dy : Float; 
  103.                                             dw, dh : Float; 
  104.                                             flags  : Draw_Flags ); 
  105.     pragma Import( C, Al_Draw_Tinted_Scaled_Bitmap, "al_draw_tinted_scaled_bitmap" ); 
  106.  
  107. private 
  108.  
  109.     ALLEGRO_FLIP_HORIZONTAL : constant Draw_Flags := 16#0001#; 
  110.     ALLEGRO_FLIP_VERTICAL   : constant Draw_Flags := 16#0002#; 
  111.  
  112. end Allegro.Bitmaps.Drawing;