Hosted by
|
with Images; use Images;
package Gray_Images is
type Gray_Pixel is mod 256;
Black : constant Gray_Pixel := 0;
Gray : constant Gray_Pixel := 128;
White : constant Gray_Pixel := 255;
function Darker
(A, B : in Gray_Pixel)
return Boolean;
type Gray_Pixel_Array is
array(Positive range <>) of Gray_Pixel;
pragma Pack(Gray_Pixel_Array);
type Gray_Pixel_Array_2 is
array(Positive range <>, Positive range <>) of Gray_Pixel;
pragma Pack(Gray_Pixel_Array_2);
type Gray_Image(Width, Height : Positive) is
new Image(Width, Height) with
record
Pixels : Gray_Pixel_Array_2(1 .. Height, 1 .. Width);
end record;
type Gray_Image_Access is access all Gray_Image'Class;
procedure Fill
(This : access Gray_Image;
Color : in Gray_Pixel);
end Gray_Images;
|