diff options
Diffstat (limited to 'spec/fltk-images.ads')
-rw-r--r-- | spec/fltk-images.ads | 124 |
1 files changed, 29 insertions, 95 deletions
diff --git a/spec/fltk-images.ads b/spec/fltk-images.ads index 9a02f23..165c203 100644 --- a/spec/fltk-images.ads +++ b/spec/fltk-images.ads @@ -7,10 +7,6 @@ package FLTK.Images is - ------------- - -- Types -- - ------------- - type Image is new Wrapper with private; type Image_Reference (Data : not null access Image'Class) is limited null record @@ -20,23 +16,27 @@ package FLTK.Images is type Blend is new Float range 0.0 .. 1.0; - No_Image_Error, File_Access_Error, Format_Error : exception; + No_Image_Error, File_Access_Error, Format_Error : exception; - -------------------- - -- Construction -- - -------------------- package Forge is + -- This creates an empty image with no data, so not that useful. + function Create (Width, Height, Depth : in Natural) return Image; end Forge; + + + + -- Copying -- + function Get_Copy_Algorithm return Scaling_Kind; @@ -55,9 +55,7 @@ package FLTK.Images is - -------------- -- Colors -- - -------------- procedure Color_Average (This : in out Image; @@ -70,9 +68,7 @@ package FLTK.Images is - ---------------- -- Activity -- - ---------------- procedure Inactive (This : in out Image); @@ -87,9 +83,7 @@ package FLTK.Images is - ------------------ -- Dimensions -- - ------------------ function Get_W (This : in Image) @@ -103,86 +97,23 @@ package FLTK.Images is (This : in Image) return Natural; - function Get_Line_Data + function Get_Line_Size (This : in Image) return Natural; - function Get_Data_Count - (This : in Image) - return Natural; - - function Get_Data_Size - (This : in Image) - return Natural; - - - - - ------------------ - -- Pixel Data -- - ------------------ - - function Get_Datum - (This : in Image; - Data : in Positive; - Position : in Positive) - return Color_Component - with Pre => - Data <= Get_Data_Count (This) and - Position <= Get_Data_Size (This); - - procedure Set_Datum - (This : in out Image; - Data : in Positive; - Position : in Positive; - Value : in Color_Component) - with Pre => - Data <= Get_Data_Count (This) and - Position <= Get_Data_Size (This); - - function Get_Data - (This : in Image; - Data : in Positive; - Position : in Positive; - Count : in Natural) - return Color_Component_Array - with Pre => - Data <= Get_Data_Count (This) and - Position <= Get_Data_Size (This) and - Count <= Get_Data_Size (This) - Position + 1; - - function All_Data - (This : in Image; - Data : in Positive) - return Color_Component_Array - with Pre => - Data <= Get_Data_Count (This); - - procedure Update_Data - (This : in out Image; - Data : in Positive; - Position : in Positive; - Values : in Color_Component_Array) - with Pre => - Data <= Get_Data_Count (This) and - Position <= Get_Data_Size (This) and - Values'Length <= Get_Data_Size (This) - Position + 1; - - --------------- -- Drawing -- - --------------- procedure Draw (This : in Image; X, Y : in Integer); procedure Draw - (This : in Image; - X, Y, W, H : in Integer; - CX, CY : in Integer := 0); + (This : in Image; + X, Y, W, H : in Integer; + Clip_X, Clip_Y : in Integer := 0); procedure Draw_Empty (This : in Image; @@ -198,40 +129,43 @@ private (This : in out Image); + procedure Raise_Fail_Errors + (This : in Image'Class); + + + function fl_image_data + (I : in Storage.Integer_Address) + return Storage.Integer_Address; + pragma Import (C, fl_image_data, "fl_image_data"); + pragma Inline (fl_image_data); + + function fl_image_count + (I : in Storage.Integer_Address) + return Interfaces.C.int; + pragma Import (C, fl_image_count, "fl_image_count"); + pragma Inline (fl_image_count); pragma Inline (Get_Copy_Algorithm); pragma Inline (Set_Copy_Algorithm); pragma Inline (Copy); - pragma Inline (Color_Average); pragma Inline (Desaturate); - pragma Inline (Inactive); pragma Inline (Is_Empty); pragma Inline (Uncache); - pragma Inline (Get_W); pragma Inline (Get_H); pragma Inline (Get_D); - pragma Inline (Get_Line_Data); - pragma Inline (Get_Data_Count); - + pragma Inline (Get_Line_Size); pragma Inline (Draw); pragma Inline (Draw_Empty); - - - function fl_image_fail - (I : in Storage.Integer_Address) - return Interfaces.C.int; - pragma Import (C, fl_image_fail, "fl_image_fail"); - - end FLTK.Images; + |