B
This commit is contained in:
parent
e5e8880e41
commit
518da4a923
1019 changed files with 15877 additions and 0 deletions
28
Task/Bitmap/Ada/bitmap-2.ada
Normal file
28
Task/Bitmap/Ada/bitmap-2.ada
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
|
||||
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;
|
||||
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;
|
||||
end loop;
|
||||
New_Line;
|
||||
end loop;
|
||||
end Print;
|
||||
|
||||
end Bitmap_Store;
|
||||
Loading…
Add table
Add a link
Reference in a new issue