with Allegro.Bitmaps; use Allegro.Bitmaps;
package Super2xSaI is
-- Initializes the Super 2xSaI library. This must be called before calling
-- a filtering procedure.
--
-- depth: the color depth to use when filtering. source and destination
-- bitmaps must use this color depth.
function Init_2xSaI( depth : Integer ) return Integer;
pragma Precondition( depth = 8 or else
depth = 15 or else
depth = 16 or else
depth = 24 or else
depth = 32 );
-- Enlarges a bitmap by 2x magnification using the Super 2xSaI filter. The
-- destination bitmap dimensions must be at least
-- (dx+width*2-1) by (dy+height*2-1).
--
-- src : the source bitmap
-- dest : the destination bitmap (must be large enough!)
-- sx, sy: the source bitmap coordinates
-- dx, sy: the destination bitmap coordinates
-- width : the width of the area from the source bitmap to scale
-- height: the height of the area from the source bitmap to scale
procedure Super2xSaI( src, dest : not null A_Bitmap;
sx, sy,
dx, dy : Integer;
width, height : Positive );
pragma Precondition( Get_Width( src ) >= width );
pragma Precondition( Get_Height( src ) >= height );
pragma Precondition( Get_Width( dest ) >= dx + width*2 );
pragma Precondition( Get_Height( dest ) >= dy + height*2 );
-- Enlarges a bitmap by 2x magnification using the Super Eagle filter. The
-- destination bitmap dimensions must be at least
-- (dx+width*2-1) by (dy+height*2-1).
--
-- src : the source bitmap
-- dest : the destination bitmap (must be large enough!)
-- sx, sy: the source bitmap coordinates
-- dx, sy: the destination bitmap coordinates
-- width : the width of the area from the source bitmap to scale
-- height: the height of the area from the source bitmap to scale
procedure SuperEagle( src, dest : not null A_Bitmap;
sx, sy,
dx, dy : Integer;
width, height : Positive );
pragma Precondition( Get_Width( src ) >= width );
pragma Precondition( Get_Height( src ) >= height );
pragma Precondition( Get_Width( dest ) >= dx + width*2 );
pragma Precondition( Get_Height( dest ) >= dy + height*2 );
private
pragma Import( C, Init_2xSaI, "Init_2xSaI" );
pragma Import( C, Super2xSaI, "Super2xSaI" );
pragma Import( C, SuperEagle, "SuperEagle" );
end Super2xSaI;