aboutsummaryrefslogtreecommitdiff
path: root/spec/fltk-images-rgb.ads
diff options
context:
space:
mode:
Diffstat (limited to 'spec/fltk-images-rgb.ads')
-rw-r--r--spec/fltk-images-rgb.ads22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/fltk-images-rgb.ads b/spec/fltk-images-rgb.ads
index daa31c6..d893cec 100644
--- a/spec/fltk-images-rgb.ads
+++ b/spec/fltk-images-rgb.ads
@@ -25,10 +25,10 @@ package FLTK.Images.RGB is
-- Static Settings --
function Get_Max_Size
- return Natural;
+ return Size_Type;
procedure Set_Max_Size
- (Value : in Natural);
+ (Value : in Size_Type);
@@ -45,8 +45,8 @@ package FLTK.Images.RGB is
Line_Size : in Natural := 0)
return RGB_Image
with Pre => (if Line_Size = 0
- then Data'Length = Width * Height * Depth
- else Data'Length = Line_Size * Height)
+ then Data'Length >= Size_Type (Width) * Size_Type (Height) * Size_Type (Depth)
+ else Data'Length >= Size_Type (Line_Size) * Size_Type (Height))
and Data'Length <= Get_Max_Size;
function Create
@@ -98,31 +98,31 @@ package FLTK.Images.RGB is
function Data_Size
(This : in RGB_Image)
- return Natural;
+ return Size_Type;
function Get_Datum
(This : in RGB_Image;
- Place : in Positive)
+ Place : in Positive_Size)
return Color_Component
with Pre => Place <= This.Data_Size;
procedure Set_Datum
(This : in out RGB_Image;
- Place : in Positive;
+ Place : in Positive_Size;
Value : in Color_Component)
with Pre => Place <= This.Data_Size;
function Slice
(This : in RGB_Image;
- Low : in Positive;
- High : in Natural)
+ Low : in Positive_Size;
+ High : in Size_Type)
return Color_Component_Array
with Pre => High <= This.Data_Size,
- Post => Slice'Result'Length = Integer'Max (0, High - Low + 1);
+ Post => Slice'Result'Length = Size_Type'Max (0, High - Low + 1);
procedure Overwrite
(This : in out RGB_Image;
- Place : in Positive;
+ Place : in Positive_Size;
Values : in Color_Component_Array)
with Pre => Place + Values'Length - 1 <= This.Data_Size;