with Allegro.Bitmaps; use Allegro.Bitmaps;
package Tanskanen is
copyright : constant String := "By Esa Tanskanen (Fladimir da Gorf)";
version : constant String := "BlendColors32";
-- Draws a 32bit bitmap onto another 32bit bitmap using alpha channel
-- blending. 'src' will be clipped when drawn onto 'dst'. This procedure is
-- highly optimized for speed.
--
-- src : The source bitmap
-- dst : The destination bitmap
-- dst_x : The X coordinate on 'dst' to draw 'src'
-- dst_y : The Y coordinate on 'dst' to draw 'src'
procedure AlphaBlend32( src,
dst : not null A_Bitmap;
dst_x,
dst_y : Integer );
-- Draws a 32bit bitmap onto another 32bit bitmap using alpha channel
-- blending and with a specified opacity, 'globalAlpha'. The value of
-- 'globalAlpha' should be within 0..255, where 0 is completely transparent
-- and 255 is completely opaque. 'src' will be clipped when drawn onto
-- 'dst'. This procedure is highly optimized for speed.
--
-- src : The source bitmap
-- dst : The destination bitmap
-- dst_x : The X coordinate on 'dst' to draw 'src'
-- dst_y : The Y coordinate on 'dst' to draw 'src'
-- globalAlpha : The global color to use blending 'src' to 'dst'
procedure AlphaBlend32_Ex( src,
dst : not null A_Bitmap;
dst_x,
dst_y : Integer;
globalAlpha : Integer );
pragma Precondition( globalAlpha >= 0 and then globalAlpha <= 255 );
private
pragma Import( C, AlphaBlend32, "AlphaBlend32" );
pragma Import( C, AlphaBlend32_Ex, "AlphaBlend32_Ex" );
end Tanskanen;