aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--body/fltk-draw.adb12
-rw-r--r--doc/fl_draw.html22
-rw-r--r--spec/fltk-draw.ads22
3 files changed, 34 insertions, 22 deletions
diff --git a/body/fltk-draw.adb b/body/fltk-draw.adb
index 92b3ebc..3ce8918 100644
--- a/body/fltk-draw.adb
+++ b/body/fltk-draw.adb
@@ -1006,12 +1006,12 @@ package body FLTK.Draw is
(X, Y, W, H : in Integer;
Data : in Color_Component_Array;
Depth : in Positive := 3;
- Line_Data : in Natural := 0;
+ Line_Size : in Natural := 0;
Flip_Horizontal : in Boolean := False;
Flip_Vertical : in Boolean := False)
is
Real_Depth : Integer := Depth;
- Real_Line_Data : Integer := Line_Data;
+ Real_Line_Data : Integer := Line_Size;
begin
if Flip_Horizontal then
Real_Depth := Real_Depth * (-1);
@@ -1077,12 +1077,12 @@ package body FLTK.Draw is
(X, Y, W, H : in Integer;
Data : in Color_Component_Array;
Depth : in Positive := 1;
- Line_Data : in Natural := 0;
+ Line_Size : in Natural := 0;
Flip_Horizontal : Boolean := False;
Flip_Vertical : Boolean := False)
is
Real_Depth : Integer := Depth;
- Real_Line_Data : Integer := Line_Data;
+ Real_Line_Data : Integer := Line_Size;
begin
if Flip_Horizontal then
Real_Depth := Real_Depth * (-1);
@@ -1149,7 +1149,7 @@ package body FLTK.Draw is
Colors : in FLTK.Images.Pixmaps.Color_Definition_Array;
Pixels : in FLTK.Images.Pixmaps.Pixmap_Data;
X, Y : in Integer;
- Hue : in Color := Grey0_Color)
+ Tone : in Color := Grey0_Color)
is
C_Data : Pixmap_Marshal.chars_ptr_array_access :=
Pixmap_Marshal.Marshal_Data (Values, Colors, Pixels);
@@ -1157,7 +1157,7 @@ package body FLTK.Draw is
(Storage.To_Integer (C_Data (C_Data'First)'Address),
Interfaces.C.int (X),
Interfaces.C.int (Y),
- Interfaces.C.unsigned (Hue));
+ Interfaces.C.unsigned (Tone));
begin
pragma Assert (Result /= 0);
Pixmap_Marshal.Free_Recursive (C_Data);
diff --git a/doc/fl_draw.html b/doc/fl_draw.html
index d987920..55b08bd 100644
--- a/doc/fl_draw.html
+++ b/doc/fl_draw.html
@@ -415,9 +415,12 @@ procedure Draw_Image
(X, Y, W, H : in Integer;
Data : in Color_Component_Array;
Depth : in Positive := 3;
- Line_Data : in Natural := 0;
+ Line_Size : in Natural := 0;
Flip_Horizontal : in Boolean := False;
- Flip_Vertical : 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);
</pre></td>
</tr>
@@ -444,9 +447,12 @@ procedure Draw_Image_Mono
(X, Y, W, H : in Integer;
Data : in Color_Component_Array;
Depth : in Positive := 1;
- Line_Data : in Natural := 0;
+ Line_Size : in Natural := 0;
Flip_Horizontal : Boolean := False;
- Flip_Vertical : Boolean := False);
+ Flip_Vertical : Boolean := False)
+with Pre => (if Line_Size = 0
+ then Data'Length >= W * H * Depth
+ else Data'Length >= Line_Size * H);
</pre></td>
</tr>
@@ -477,7 +483,7 @@ procedure Draw_Pixmap
Colors : in FLTK.Images.Pixmaps.Color_Definition_Array;
Pixels : in FLTK.Images.Pixmaps.Pixmap_Data;
X, Y : in Integer;
- Hue : in Color := Grey0_Color)
+ Tone : in Color := Grey0_Color)
with Pre =>
Colors'Length = Values.Colors and
Pixels'Length (1) = Values.Height and
@@ -909,9 +915,9 @@ function Read_Image
Alpha : in Integer := 0)
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);
+ (if Alpha = 0
+ then Read_Image'Result'Length = W * H * 3
+ else Read_Image'Result'Length = W * H * 4);
</pre></td>
</tr>
diff --git a/spec/fltk-draw.ads b/spec/fltk-draw.ads
index 950a247..8346112 100644
--- a/spec/fltk-draw.ads
+++ b/spec/fltk-draw.ads
@@ -252,9 +252,12 @@ package FLTK.Draw is
(X, Y, W, H : in Integer;
Data : in Color_Component_Array;
Depth : in Positive := 3;
- Line_Data : in Natural := 0;
+ Line_Size : in Natural := 0;
Flip_Horizontal : in Boolean := False;
- Flip_Vertical : 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);
procedure Draw_Image
(X, Y, W, H : in Integer;
@@ -265,9 +268,12 @@ package FLTK.Draw is
(X, Y, W, H : in Integer;
Data : in Color_Component_Array;
Depth : in Positive := 1;
- Line_Data : in Natural := 0;
+ Line_Size : in Natural := 0;
Flip_Horizontal : Boolean := False;
- Flip_Vertical : Boolean := False);
+ Flip_Vertical : Boolean := False)
+ with Pre => (if Line_Size = 0
+ then Data'Length >= W * H * Depth
+ else Data'Length >= Line_Size * H);
procedure Draw_Image_Mono
(X, Y, W, H : in Integer;
@@ -279,7 +285,7 @@ package FLTK.Draw is
Colors : in FLTK.Images.Pixmaps.Color_Definition_Array;
Pixels : in FLTK.Images.Pixmaps.Pixmap_Data;
X, Y : in Integer;
- Hue : in Color := Grey0_Color)
+ Tone : in Color := Grey0_Color)
with Pre =>
Colors'Length = Values.Colors and
Pixels'Length (1) = Values.Height and
@@ -292,9 +298,9 @@ package FLTK.Draw is
Alpha : in Integer := 0)
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);
+ (if Alpha = 0
+ then Read_Image'Result'Length = W * H * 3
+ else Read_Image'Result'Length = W * H * 4);