1. with Allegro.Bitmaps;                   use Allegro.Bitmaps; 
  2. with Allegro.Fixed_Point_Math;          use Allegro.Fixed_Point_Math; 
  3. with Allegro.Truecolor;                 use Allegro.Truecolor; 
  4.  
  5. package Allegro.Drawing is 
  6.  
  7.     -- Allegro 4.2.2 - Drawing primitives 
  8.     -- This package is missing: 
  9.     -- _putpixel 
  10.     -- _putpixel15 
  11.     -- _putpixel16 
  12.     -- _putpixel24 
  13.     -- _putpixel32 
  14.     -- _getpixel 
  15.     -- _getpixel15 
  16.     -- _getpixel16 
  17.     -- _getpixel24 
  18.     -- _getpixel32 
  19.     -- calc_spline 
  20.     -- spline 
  21.  
  22.     type Point is 
  23.         record 
  24.             x, y : Integer; 
  25.         end record; 
  26.  
  27.     type Point_Array is array (Integer range <>) of Point; 
  28.  
  29.     type A_Draw_Proc is 
  30.         access procedure( bmp : A_Bitmap; x, y : Integer; d : Integer ); 
  31.  
  32.     --------------------------------------------------------------------------- 
  33.  
  34.     procedure Arc( bmp   : not null A_Bitmap; 
  35.                    x, y  : Integer; 
  36.                    ang1, 
  37.                    ang2  : Fixed; 
  38.                    r     : Integer; 
  39.                    color : Color_Type ); 
  40.  
  41.     procedure Circle( bmp    : not null A_Bitmap; 
  42.                       x, y, 
  43.                       radius : Integer; 
  44.                       color  : Color_Type ); 
  45.  
  46.     procedure Circlefill( bmp    : not null A_Bitmap; 
  47.                           x, y, 
  48.                           radius : Integer; 
  49.                           color  : Color_Type ); 
  50.  
  51.     procedure Clear_Bitmap( bmp : not null A_Bitmap ); 
  52.  
  53.     procedure Clear_To_Color( bmp : not null A_Bitmap; color : Color_Type ); 
  54.  
  55.     procedure Clear_To_Transparent( bmp : not null A_Bitmap ); 
  56.  
  57.     procedure Do_Arc( bmp    : not null A_Bitmap; 
  58.                       x, y, 
  59.                       a1, a2 : Fixed; 
  60.                       r      : Integer; 
  61.                       d      : Integer; 
  62.                       proc   : not null A_Draw_Proc ); 
  63.  
  64.     procedure Do_Circle( bmp    : not null A_Bitmap; 
  65.                          x, y, 
  66.                          radius : Integer; 
  67.                          d      : Integer; 
  68.                          proc   : not null A_Draw_Proc ); 
  69.  
  70.     procedure Do_Ellipse( bmp    : not null A_Bitmap; 
  71.                           x, y, 
  72.                           rx, ry : Integer; 
  73.                           d      : Integer; 
  74.                           proc   : not null A_Draw_Proc ); 
  75.  
  76.     procedure Do_Line( bmp    : not null A_Bitmap; 
  77.                        x1, y1, 
  78.                        x2, y2 : Integer; 
  79.                        d      : Integer; 
  80.                        proc   : not null A_Draw_Proc ); 
  81.  
  82.     procedure Ellipse( bmp    : not null A_Bitmap; 
  83.                        x, y, 
  84.                        rx, ry : Integer; 
  85.                        color  : Color_Type ); 
  86.  
  87.     procedure Ellipsefill( bmp    : not null A_Bitmap; 
  88.                            x, y, 
  89.                            rx, ry : Integer; 
  90.                            color  : Color_Type ); 
  91.  
  92.     procedure Fastline( bmp    : not null A_Bitmap; 
  93.                         x1, y1, 
  94.                         x2, y2 : Integer; 
  95.                         color  : Color_Type ); 
  96.  
  97.     procedure Floodfill( bmp   : not null A_Bitmap; 
  98.                          x, y  : Integer; 
  99.                          color : Color_Type ); 
  100.  
  101.     function Getpixel( bmp : not null A_Bitmap; x, y : Integer ) return Color_Type; 
  102.  
  103.     procedure Hline( bmp       : not null A_Bitmap; 
  104.                      x1, y, x2 : Integer; 
  105.                      color     : Color_Type ); 
  106.  
  107.     procedure Line( bmp    : not null A_Bitmap; 
  108.                     x1, y1, 
  109.                     x2, y2 : Integer; 
  110.                     color  : Color_Type ); 
  111.  
  112.     procedure Polygon( bmp    : not null A_Bitmap; 
  113.                        points : Point_Array; 
  114.                        color  : Color_Type ); 
  115.  
  116.     procedure Putpixel( bmp   : not null A_Bitmap; 
  117.                         x, y  : Integer; 
  118.                         color : Color_Type ); 
  119.  
  120.     procedure Rect( bmp    : not null A_Bitmap; 
  121.                     x1, y1, 
  122.                     x2, y2 : Integer; 
  123.                     color  : Color_Type ); 
  124.  
  125.     procedure Rectfill( bmp    : not null A_Bitmap; 
  126.                         x1, y1, 
  127.                         x2, y2 : Integer; 
  128.                         color  : Color_Type ); 
  129.  
  130.     procedure Triangle( bmp    : not null A_Bitmap; 
  131.                         x1, y1, 
  132.                         x2, y2, 
  133.                         x3, y3 : Integer; 
  134.                         color  : Color_Type ); 
  135.  
  136.     procedure Vline( bmp       : not null A_Bitmap; 
  137.                      x, y1, y2 : Integer; 
  138.                      color     : Color_Type ); 
  139.  
  140. private 
  141.  
  142.     pragma Convention( C, Point ); 
  143.     pragma Convention( C, Point_Array ); 
  144.     pragma Convention( C, A_Draw_Proc ); 
  145.  
  146.     pragma Import( C, Arc, "arc" ); 
  147.     pragma Import( C, Circle, "circle" ); 
  148.     pragma Import( C, Circlefill, "circlefill" ); 
  149.     pragma Import( C, Clear_Bitmap, "clear_bitmap" ); 
  150.     pragma Import( C, Clear_To_Color, "clear_to_color" ); 
  151.     pragma Import( C, Do_Arc, "do_arc" ); 
  152.     pragma Import( C, Do_Circle, "do_circle" ); 
  153.     pragma Import( C, Do_Ellipse, "do_ellipse" ); 
  154.     pragma Import( C, Do_Line, "do_line" ); 
  155.     pragma Import( C, Ellipsefill, "ellipsefill" ); 
  156.     pragma Import( C, Ellipse, "ellipse" ); 
  157.     pragma Import( C, Fastline, "fastline" ); 
  158.     pragma Import( C, Floodfill, "floodfill" ); 
  159.     pragma Import( C, Getpixel, "getpixel" ); 
  160.     pragma Import( C, Hline, "hline" ); 
  161.     pragma Import( C, Line, "line" ); 
  162.     pragma Import( C, Putpixel, "putpixel" ); 
  163.     pragma Import( C, Rect, "rect" ); 
  164.     pragma Import( C, Rectfill, "rectfill" ); 
  165.     pragma Import( C, Triangle, "triangle" ); 
  166.     pragma Import( C, Vline, "vline" ); 
  167.  
  168. end Allegro.Drawing;