diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-04-09 23:54:13 +1200 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-04-09 23:54:13 +1200 |
commit | a41dedec645a0894d9173e5de0b502f727572f62 (patch) | |
tree | 808cba7c49925deca77b738eaa69e05132bbc834 /spec/fltk-images-bitmaps.ads | |
parent | 8d8ecd6db517cb208ef165785575287568e5a175 (diff) |
Fixed RGB_Image size_t issue, RGB_Image/Bitmap preconditions
Diffstat (limited to 'spec/fltk-images-bitmaps.ads')
-rw-r--r-- | spec/fltk-images-bitmaps.ads | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/fltk-images-bitmaps.ads b/spec/fltk-images-bitmaps.ads index b31885c..73afc62 100644 --- a/spec/fltk-images-bitmaps.ads +++ b/spec/fltk-images-bitmaps.ads @@ -15,9 +15,9 @@ package FLTK.Images.Bitmaps is - -- Rounds a number of bits up to the next byte boundary. + -- Calculates the bytes needed to hold a given number of bits. - function To_Next_Byte + function Bytes_Needed (Bits : in Natural) return Natural; @@ -33,7 +33,7 @@ package FLTK.Images.Bitmaps is (Data : in Color_Component_Array; Width, Height : in Natural) return Bitmap - with Pre => Data'Length = To_Next_Byte (Width) * Height; + with Pre => Data'Length >= Bytes_Needed (Width) * Height; end Forge; @@ -123,7 +123,7 @@ private (This : in out Bitmap); - pragma Inline (To_Next_Byte); + pragma Inline (Bytes_Needed); pragma Inline (Copy); |