text stringlengths 0 234 |
|---|
(Internal_Draw_Line); |
begin |
if Length > Area.Width then |
Ratio := Float (Area.Width) / Float (Length); |
else |
Ratio := 1.0; |
Current.X := (Area.Width - Length) / 2; |
end if; |
Buffer.Set_Source (Foreground); |
for C of Msg loop |
Draw_Glyph |
(Fnt => Font, |
C => C, |
X => Current.X, |
Y => Current.Y, |
Height => Area.Height, |
Bold => Bold); |
end loop; |
if Outline and then Area.Height > 40 then |
for Y in Area.Position.Y + 1 .. Area.Position.Y + Area.Height loop |
Prev := Buffer.Pixel ((Area.Position.X, Y)); |
if Prev = FG then |
Buffer.Set_Pixel ((Area.Position.X, Y), Black); |
end if; |
for X in Area.Position.X + 1 .. Area.Position.X + Area.Width loop |
declare |
Col : constant UInt32 := Buffer.Pixel ((X, Y)); |
Top : constant UInt32 := Buffer.Pixel ((X, Y - 1)); |
begin |
if Prev /= FG |
and then Col = FG |
then |
Buffer.Set_Pixel ((X, Y), Blk); |
elsif Prev = FG |
and then Col /= FG |
then |
Buffer.Set_Pixel ((X - 1, Y), Blk); |
elsif Top /= FG |
and then Top /= Blk |
and then Col = FG |
then |
Buffer.Set_Pixel ((X, Y), Blk); |
elsif Top = FG |
and then Col /= FG |
then |
Buffer.Set_Pixel ((X, Y - 1), Blk); |
end if; |
Prev := Col; |
Function Definition: procedure Convert_Card_Identification_Data_Register |
Function Body: (W0, W1, W2, W3 : UInt32; |
Res : out Card_Identification_Data_Register); |
-- Convert the R2 reply to CID |
procedure Convert_Card_Specific_Data_Register |
(W0, W1, W2, W3 : UInt32; |
Card_Type : Supported_SD_Memory_Cards; |
CSD : out Card_Specific_Data_Register); |
-- Convert the R2 reply to CSD |
procedure Convert_SDCard_Configuration_Register |
(W0, W1 : UInt32; |
SCR : out SDCard_Configuration_Register); |
-- Convert W0 (MSB) / W1 (LSB) to SCR. |
function Compute_Card_Capacity |
(CSD : Card_Specific_Data_Register; |
Card_Type : Supported_SD_Memory_Cards) return UInt64; |
-- Compute the card capacity (in bytes) from the CSD |
function Compute_Card_Block_Size |
(CSD : Card_Specific_Data_Register; |
Card_Type : Supported_SD_Memory_Cards) return UInt32; |
-- Compute the card block size (in bytes) from the CSD. |
function Get_Transfer_Rate |
(CSD : Card_Specific_Data_Register) return Natural; |
-- Compute transfer rate from CSD |
function Swap32 (Val : UInt32) return UInt32 with Inline_Always; |
function BE32_To_Host (Val : UInt32) return UInt32 with Inline_Always; |
-- Swap bytes in a word |
------------ |
-- Swap32 -- |
------------ |
function Swap32 (Val : UInt32) return UInt32 is |
begin |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.