aboutsummaryrefslogtreecommitdiff
path: root/body/fltk-images-rgb.adb
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-04-11 22:21:26 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2025-04-11 22:21:26 +1200
commitfb4183c9244ee31aa5cb8bc9745c9242b1fafeeb (patch)
treea33c13dd090a1798a6638b9762dcc7187438f980 /body/fltk-images-rgb.adb
parent192b9538fcbe46649dccd44b499a0d52d17cf283 (diff)
Moved Size_Type to FLTK and better incorporated it into Bitmaps and RGB_Images
Diffstat (limited to 'body/fltk-images-rgb.adb')
-rw-r--r--body/fltk-images-rgb.adb16
1 files changed, 8 insertions, 8 deletions
diff --git a/body/fltk-images-rgb.adb b/body/fltk-images-rgb.adb
index 00fc1ed..71d2520 100644
--- a/body/fltk-images-rgb.adb
+++ b/body/fltk-images-rgb.adb
@@ -275,21 +275,21 @@ package body FLTK.Images.RGB is
function Data_Size
(This : in RGB_Image)
- return Natural
+ return Size_Type
is
Per_Line : constant Natural := This.Get_Line_Size;
begin
if Per_Line = 0 then
- return This.Get_W * This.Get_D * This.Get_H;
+ return Size_Type (This.Get_W) * Size_Type (This.Get_D) * Size_Type (This.Get_H);
else
- return Per_Line * This.Get_H;
+ return Size_Type (Per_Line) * Size_Type (This.Get_H);
end if;
end Data_Size;
function Get_Datum
(This : in RGB_Image;
- Place : in Positive)
+ Place : in Positive_Size)
return Color_Component
is
The_Data : Color_Component_Array (1 .. This.Data_Size);
@@ -302,7 +302,7 @@ package body FLTK.Images.RGB is
procedure Set_Datum
(This : in out RGB_Image;
- Place : in Positive;
+ Place : in Positive_Size;
Value : in Color_Component)
is
The_Data : Color_Component_Array (1 .. This.Data_Size);
@@ -315,8 +315,8 @@ package body FLTK.Images.RGB is
function Slice
(This : in RGB_Image;
- Low : in Positive;
- High : in Natural)
+ Low : in Positive_Size;
+ High : in Size_Type)
return Color_Component_Array
is
The_Data : Color_Component_Array (1 .. This.Data_Size);
@@ -329,7 +329,7 @@ package body FLTK.Images.RGB is
procedure Overwrite
(This : in out RGB_Image;
- Place : in Positive;
+ Place : in Positive_Size;
Values : in Color_Component_Array)
is
The_Data : Color_Component_Array (1 .. This.Data_Size);