text
stringlengths 0
234
|
|---|
---------------
|
-- Set_Align --
|
---------------
|
procedure Set_Align (This : in out TP_Device; Align : Text_Align) is
|
Mode : Character;
|
begin
|
case Align is
|
when Left => Mode := '0';
|
when Center => Mode := '1';
|
when Right => Mode := '2';
|
end case;
|
Write (This, ASCII.ESC & 'a' & Mode);
|
end Set_Align;
|
----------------------
|
-- Set_Font_Enlarge --
|
----------------------
|
procedure Set_Font_Enlarge (This : in out TP_Device; Height, Width : Boolean) is
|
Data : UInt8 := 0;
|
begin
|
if Height then
|
Data := Data or 16#01#;
|
end if;
|
if Width then
|
Data := Data or 16#10#;
|
end if;
|
Write (This, ASCII.GS & '!' & To_Char (Data));
|
end Set_Font_Enlarge;
|
--------------
|
-- Set_Bold --
|
--------------
|
procedure Set_Bold (This : in out TP_Device; Bold : Boolean) is
|
begin
|
Write (This, ASCII.ESC & 'E' & To_Char (if Bold then 1 else 0));
|
end Set_Bold;
|
----------------------
|
-- Set_Double_Width --
|
----------------------
|
procedure Set_Double_Width (This : in out TP_Device; Double : Boolean) is
|
begin
|
if Double then
|
Write (This, ASCII.ESC & ASCII.SO);
|
else
|
Write (This, ASCII.ESC & ASCII.DC4);
|
end if;
|
end Set_Double_Width;
|
----------------
|
-- Set_UpDown --
|
----------------
|
procedure Set_UpDown (This : in out TP_Device; UpDown : Boolean) is
|
begin
|
Write (This, ASCII.ESC & '{' & To_Char (if UpDown then 1 else 0));
|
end Set_UpDown;
|
------------------
|
-- Set_Reversed --
|
------------------
|
procedure Set_Reversed (This : in out TP_Device; Reversed : Boolean) is
|
begin
|
Write (This, ASCII.GS & 'B' & To_Char (if Reversed then 1 else 0));
|
end Set_Reversed;
|
--------------------------
|
-- Set_Underline_Height --
|
--------------------------
|
procedure Set_Underline_Height (This : in out TP_Device; Height : Underline_Height) is
|
begin
|
Write (This, ASCII.ESC & '-' & To_Char (Height));
|
end Set_Underline_Height;
|
-----------------------
|
-- Set_Character_Set --
|
-----------------------
|
procedure Set_Character_Set (This : in out TP_Device; Set : Character_Set) is
|
begin
|
Write (This, ASCII.ESC & 't' & To_Char (Character_Set'Pos (Set)));
|
end Set_Character_Set;
|
----------
|
-- Feed --
|
----------
|
procedure Feed (This : in out TP_Device; Rows : UInt8) is
|
begin
|
Write (This, ASCII.ESC & 'd' & To_Char (Rows));
|
end Feed;
|
------------------
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.