Hosted by
|
with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO;
with Bit_Buffers;
package Depixel is
type Bit_Buffer(Byte_Count : Positive) is limited private;
type Bit_Buffer_Access is access Bit_Buffer;
function Create
(Byte_Count : in Positive)
return Bit_Buffer_Access;
procedure Deallocate
(This : in out Bit_Buffer_Access);
procedure Reset
(This : access Bit_Buffer);
procedure Clear
(This : access Bit_Buffer);
procedure Read_Row
(From : in Stream_Access;
This : access Bit_Buffer);
function Read_Bit
(This : access Bit_Buffer)
return Boolean;
private
type Triple is mod 3;
subtype Natural_Triple is Natural range 0 .. 2;
type Bit_Buffer_Array is array(Natural range <>) of Bit_Buffers.Bit_Buffer_Access;
type Bit_Matrix is array(Natural range <>, Natural range <>) of Boolean;
type Bit_Buffer(Byte_Count : Positive) is record
Internal : Bit_Buffer_Array(Natural_Triple);
Matrix : Bit_Matrix(Natural_Triple, Natural_Triple);
Center_X : Triple := 1;
Center_Y : Triple := 1;
end record;
end Depixel;
|