From fb4183c9244ee31aa5cb8bc9745c9242b1fafeeb Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Fri, 11 Apr 2025 22:21:26 +1200 Subject: Moved Size_Type to FLTK and better incorporated it into Bitmaps and RGB_Images --- spec/fltk-draw.ads | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/fltk-draw.ads') diff --git a/spec/fltk-draw.ads b/spec/fltk-draw.ads index 8346112..a2c66f3 100644 --- a/spec/fltk-draw.ads +++ b/spec/fltk-draw.ads @@ -256,8 +256,8 @@ package FLTK.Draw is Flip_Horizontal : in Boolean := False; Flip_Vertical : in Boolean := False) with Pre => (if Line_Size = 0 - then Data'Length >= W * H * Depth - else Data'Length >= Line_Size * H); + then Data'Length >= Size_Type (W) * Size_Type (H) * Size_Type (Depth) + else Data'Length >= Size_Type (Line_Size) * Size_Type (H)); procedure Draw_Image (X, Y, W, H : in Integer; @@ -272,8 +272,8 @@ package FLTK.Draw is Flip_Horizontal : Boolean := False; Flip_Vertical : Boolean := False) with Pre => (if Line_Size = 0 - then Data'Length >= W * H * Depth - else Data'Length >= Line_Size * H); + then Data'Length >= Size_Type (W) * Size_Type (H) * Size_Type (Depth) + else Data'Length >= Size_Type (Line_Size) * Size_Type (H)); procedure Draw_Image_Mono (X, Y, W, H : in Integer; @@ -299,8 +299,8 @@ package FLTK.Draw is return Color_Component_Array with Post => (if Alpha = 0 - then Read_Image'Result'Length = W * H * 3 - else Read_Image'Result'Length = W * H * 4); + then Read_Image'Result'Length = Size_Type (W) * Size_Type (H) * 3 + else Read_Image'Result'Length = Size_Type (W) * Size_Type (H) * 4); -- cgit