September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,10 +1,10 @@
package Bitmap_Store is
type Luminance is mod 2**8;
type Pixel is record
R, G, B : Luminance;
R, G, B : Luminance := Luminance'First;
end record;
Black : constant Pixel := (others => 0);
White : constant Pixel := (others => 255);
Black : constant Pixel := (others => Luminance'First);
White : constant Pixel := (others => Luminance'Last);
type Image is array (Positive range <>, Positive range <>) of Pixel;
procedure Fill (Picture : in out Image; Color : Pixel);

View file

@ -4,22 +4,14 @@ package body Bitmap_Store is
procedure Fill (Picture : in out Image; Color : Pixel) is
begin
for I in Picture'Range (1) loop
for J in Picture'Range (2) loop
Picture (I, J) := Color;
end loop;
end loop;
for p of Picture loop x:= Color;end loop;
end Fill;
procedure Print (Picture : Image) is
begin
for I in Picture'Range (1) loop
for J in Picture'Range (2) loop
if Picture (I, J) = White then
Put (' ');
else
Put ('H');
end if;
Put (if Picture (I, J) = White then ' ' else 'H');
end loop;
New_Line;
end loop;