diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-29 18:04:38 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-29 18:04:38 +1300 |
commit | ad10541237cbb2f1047bfafa7386f3784f828c42 (patch) | |
tree | b0f46db72633c6ad1ff47985a34089a9f851a419 /spec | |
parent | 82ec0d8c8d1ba164aa2d29c8f1203730aa51988c (diff) |
Filled holes in FLTK.Draw API, refactored Pixmap data marshalling
Diffstat (limited to 'spec')
-rw-r--r-- | spec/fltk-draw.ads | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/spec/fltk-draw.ads b/spec/fltk-draw.ads index cedd4da..79675fd 100644 --- a/spec/fltk-draw.ads +++ b/spec/fltk-draw.ads @@ -6,7 +6,8 @@ with - FLTK.Images, + Ada.Strings.Unbounded, + FLTK.Images.Pixmaps, FLTK.Widgets.Groups.Windows; @@ -293,6 +294,19 @@ package FLTK.Draw is Callback : in Image_Draw_Function; Depth : in Positive := 1); + procedure Draw_Pixmap + (Values : in FLTK.Images.Pixmaps.Header; + Colors : in FLTK.Images.Pixmaps.Color_Definition_Array; + Pixels : in FLTK.Images.Pixmaps.Pixmap_Data; + X, Y : in Integer; + Hue : in Color := Grey0_Color) + with Pre => + Colors'Length = Values.Colors and + Pixels'Length (1) = Values.Height and + (for all Definition of Colors => + Ada.Strings.Unbounded.Length (Definition.Name) = Values.Per_Pixel) and + Pixels'Length (2) = Values.Width * Values.Per_Pixel; + function Read_Image (X, Y, W, H : in Integer; Alpha : in Integer := 0) @@ -381,6 +395,19 @@ package FLTK.Draw is (Text : in String; DX, DY, W, H : out Integer); + -- Last is the index of the last character processed in Text which + -- would normally be one before the index of the char pointed at by + -- the return value in the C++ version. Instead, the return value + -- here is the processed text buffer. + function Expand_Text + (Text : in String; + Max_Width : in Long_Float; + Width : out Long_Float; + Last : out Natural; + Wrap : in Boolean; + Symbols : in Boolean := False) + return String; + function Width (Text : in String) return Long_Float; @@ -528,28 +555,23 @@ private pragma Inline (Set_Spot); pragma Inline (Set_Status); - pragma Inline (Can_Do_Alpha_Blending); pragma Inline (Shortcut_Label); - pragma Inline (Latin1_To_Local); pragma Inline (Local_To_Latin1); pragma Inline (Mac_Roman_To_Local); pragma Inline (Local_To_Mac_Roman); - pragma Inline (Clip_Intersects); pragma Inline (Pop_Clip); pragma Inline (Push_Clip); pragma Inline (Push_No_Clip); pragma Inline (Restore_Clip); - pragma Inline (Overlay_Clear); pragma Inline (Overlay_Rect); - pragma Inline (Get_Color); pragma Inline (Set_Color); pragma Inline (Get_Font); @@ -559,7 +581,6 @@ private pragma Inline (Font_Descent); pragma Inline (Font_Height); - pragma Inline (Mult_Matrix); pragma Inline (Pop_Matrix); pragma Inline (Push_Matrix); @@ -573,7 +594,6 @@ private pragma Inline (Translate); pragma Inline (Vertex); - pragma Inline (Add_Symbol); pragma Inline (Draw_Text); pragma Inline (Draw_Text_Right_Left); @@ -584,14 +604,12 @@ private pragma Inline (Text_Extents); pragma Inline (Width); - pragma Inline (Begin_Complex_Polygon); pragma Inline (Begin_Line); pragma Inline (Begin_Loop); pragma Inline (Begin_Points); pragma Inline (Begin_Polygon); - pragma Inline (Arc); pragma Inline (Chord); pragma Inline (Circle); @@ -608,7 +626,6 @@ private pragma Inline (Ecks_Why_Line); pragma Inline (Why_Ecks_Line); - pragma Inline (End_Complex_Polygon); pragma Inline (End_Line); pragma Inline (End_Loop); |