aboutsummaryrefslogtreecommitdiff
path: root/test/color_chooser.adb
diff options
context:
space:
mode:
Diffstat (limited to 'test/color_chooser.adb')
-rw-r--r--test/color_chooser.adb14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/color_chooser.adb b/test/color_chooser.adb
index 09003b9..1c7537c 100644
--- a/test/color_chooser.adb
+++ b/test/color_chooser.adb
@@ -21,6 +21,7 @@ with
use type
FLTK.Color,
+ FLTK.Size_Type,
FLTK.Asks.Confirm_Result;
@@ -44,14 +45,14 @@ is
return FLTK.Color_Component_Array
is
X_Frac, Y_Frac : Long_Float;
- Offset : Integer;
+ Offset : FLTK.Size_Type;
begin
- return Data : FLTK.Color_Component_Array (1 .. W * H * 3) do
+ return Data : FLTK.Color_Component_Array (1 .. FLTK.Size_Type (W * H * 3)) do
for Y in 0 .. H - 1 loop
Y_Frac := Long_Float (Y) / Long_Float (H - 1);
for X in 0 .. W - 1 loop
X_Frac := Long_Float (X) / Long_Float (W - 1);
- Offset := 3 * (Y * W + X);
+ Offset := 3 * FLTK.Size_Type (Y * W + X);
Data (Offset + 1) :=
FLTK.Color_Component (255.0 * (1.0 - X_Frac) * (1.0 - Y_Frac));
Data (Offset + 2) :=
@@ -66,7 +67,8 @@ is
Image_Width, Image_Height : constant Natural := 100;
- The_Image_Data : FLTK.Color_Component_Array := Make_Image_Data (Image_Width, Image_Height);
+ The_Image_Data : constant FLTK.Color_Component_Array :=
+ Make_Image_Data (Image_Width, Image_Height);
type Pens is new Bx.Box with null record;
@@ -108,7 +110,7 @@ is
procedure Callback_One
- (This : in out FLTK.Widgets.Widget'Class) is
+ (Ignore : in out FLTK.Widgets.Widget'Class) is
begin
My_Color := Ask.Show_Colormap (My_Color);
The_Box.Set_Background_Color (My_Color);
@@ -118,7 +120,7 @@ is
procedure Callback_Two
- (This : in out FLTK.Widgets.Widget'Class)
+ (Ignore : in out FLTK.Widgets.Widget'Class)
is
R, G, B : FLTK.Color_Component;
begin