diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-28 21:43:17 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-28 21:43:17 +1300 |
commit | dee76d5884c6f079ea3a2387d07289534a51a0c1 (patch) | |
tree | 528b5d06ce81d48560b5c9e6836855d392e95ab0 /doc | |
parent | f5f624fd78421dbeb15fdda489caed6f210c730f (diff) |
Diffstat (limited to 'doc')
-rw-r--r-- | doc/fl_bitmap.html | 48 | ||||
-rw-r--r-- | doc/fl_image.html | 78 | ||||
-rw-r--r-- | doc/fl_pixmap.html | 45 | ||||
-rw-r--r-- | doc/fl_rgb_image.html | 51 | ||||
-rw-r--r-- | doc/fl_tiled_image.html | 6 |
5 files changed, 141 insertions, 87 deletions
diff --git a/doc/fl_bitmap.html b/doc/fl_bitmap.html index 2a8cc72..922b1b5 100644 --- a/doc/fl_bitmap.html +++ b/doc/fl_bitmap.html @@ -52,14 +52,49 @@ <td><pre> int alloc_array; </pre></td> -<td> </td> +<td>Intentionally left unbound.</td> </tr> <tr> <td><pre> const uchar * array; </pre></td> -<td> </td> +<td><pre> +function Data_Size + (This : in Bitmap) + return Natural; + +function Get_Datum + (This : in Bitmap; + Place : in Positive) + return Color_Component +with Pre => Place <= This.Data_Size; + +procedure Set_Datum + (This : in out Bitmap; + Place : in Positive; + Value : in Color_Component) +with Pre => Place <= This.Data_Size; + +function Slice + (This : in Bitmap; + Low : in Positive; + High : in Natural) + return Color_Component_Array +with Pre => High <= This.Data_Size, + Post => Slice'Result'Length = Integer'Max (0, High - Low + 1); + +procedure Overwrite + (This : in out Bitmap; + Place : in Positive; + Values : in Color_Component_Array) +with Pre => Place + Values'Length - 1 <= This.Data_Size; + +function All_Data + (This : in Bitmap) + return Color_Component_Array +with Post => All_Data'Result'Length = This.Data_Size; +</pre></td> </tr> </table> @@ -79,7 +114,8 @@ Fl_Bitmap(const char *bits, int W, int H); function Create (Data : in Color_Component_Array; Width, Height : in Natural) - return Bitmap; + return Bitmap +with Pre => Data'Length = To_Next_Byte (Width) * Height; </pre></td> </tr> @@ -120,9 +156,9 @@ virtual void draw(int X, int Y, int W, int H, </pre></td> <td><pre> procedure Draw - (This : in Bitmap; - X, Y, W, H : in Integer; - CX, CY : in Integer := 0); + (This : in Bitmap; + X, Y, W, H : in Integer; + Clip_X, Clip_Y : in Integer := 0); </pre></td> </tr> diff --git a/doc/fl_image.html b/doc/fl_image.html index 7550b5c..10c9ed8 100644 --- a/doc/fl_image.html +++ b/doc/fl_image.html @@ -84,21 +84,21 @@ <td><pre> static const int ERR_FILE_ACCESS = -2; </pre></td> -<td> </td> +<td>See the errors table.</td> </tr> <tr> <td><pre> static const int ERR_FORMAT = -3; </pre></td> -<td> </td> +<td>See the errors table.</td> </tr> <tr> <td><pre> static const int ERR_NO_IMAGE = -1; </pre></td> -<td> </td> +<td>See the errors table.</td> </tr> </table> @@ -192,20 +192,7 @@ function Copy <td><pre> int count() const; </pre></td> -<td><pre> -function Get_Data_Count - (This : in Image) - return Natural; -</pre></td> - </tr> - - <tr> -<td> </td> -<td><pre> -function Get_Data_Size - (This : in Image) - return Natural; -</pre></td> +<td>Intentionally left unbound.</td> </tr> <tr> @@ -223,53 +210,8 @@ function Get_D <td><pre> const char * const * data() const; </pre></td> -<td><pre> -function Get_Datum - (This : in Image; - Data : in Positive; - Position : in Positive) - return Color_Component -with Pre => - Data <= Get_Data_Count (This) and - Position <= Get_Data_Size (This); - -procedure Set_Datum - (This : in out Image; - Data : in Positive; - Position : in Positive; - Value : in Color_Component) -with Pre => - Data <= Get_Data_Count (This) and - Position <= Get_Data_Size (This); - -function Get_Data - (This : in Image; - Data : in Positive; - Position : in Positive; - Count : in Natural) - return Color_Component_Array -with Pre => - Data <= Get_Data_Count (This) and - Position <= Get_Data_Size (This) and - Count <= Get_Data_Size (This) - Position + 1; - -function All_Data - (This : in Image; - Data : in Positive) - return Color_Component_Array -with Pre => - Data <= Get_Data_Count (This); - -procedure Update_Data - (This : in out Image; - Data : in Positive; - Position : in Positive; - Values : in Color_Component_Array) -with Pre => - Data <= Get_Data_Count (This) and - Position <= Get_Data_Size (This) and - Values'Length <= Get_Data_Size (This) - Position + 1; -</pre></td> +<td>See Data_Size, Get_Datum, Set_Datum, Slice, Overwrite, All_Data subprograms +in Fl_Bitmap and Fl_RGB_Image.</td> </tr> <tr> @@ -289,9 +231,9 @@ virtual void draw(int X, int Y, int W, int H, </pre></td> <td><pre> procedure Draw - (This : in Image; - X, Y, W, H : in Integer; - CX, CY : in Integer := 0); + (This : in Image; + X, Y, W, H : in Integer; + Clip_X, Clip_Y : in Integer := 0); </pre></td> </tr> @@ -357,7 +299,7 @@ virtual void label(Fl_Menu_Item *m); int ld() const; </pre></td> <td><pre> -function Get_Line_Data +function Get_Line_Size (This : in Image) return Natural; </pre></td> diff --git a/doc/fl_pixmap.html b/doc/fl_pixmap.html index 60fec01..ab8c8d8 100644 --- a/doc/fl_pixmap.html +++ b/doc/fl_pixmap.html @@ -41,6 +41,31 @@ <td>Pixmap_Reference</td> </tr> + <tr> + <td>char *</td> + <td>Header</td> + </tr> + + <tr> + <td>char</td> + <td>Color_Kind</td> + </tr> + + <tr> + <td>char *</td> + <td>Color_Definition</td> + </tr> + + <tr> + <td>char **</td> + <td>Color_Definition_Array</td> + </tr> + + <tr> + <td>char **</td> + <td>Pixmap_Data</td> + </tr> + </table> @@ -72,7 +97,19 @@ Fl_Pixmap(const char *const *D); Fl_Pixmap(const uchar *const *D); </pre></td> -<td> </td> +<td><pre> +function Create + (Values : in Header; + Colors : in Color_Definition_Array; + Pixels : in Pixmap_Data) + return Pixmap +with Pre => + Colors'Length = Values.Colors and + Pixels'Length (1) = Values.Height and + (for all Definition of Colors => + Ada.Strings.Unbounded.Length (Definition.Name) = Values.Per_Pixel) and + Pixels'Length (2) = Values.Width * Values.Per_Pixel; +</pre></td> </tr> </table> @@ -134,9 +171,9 @@ virtual void draw(int X, int Y, int W, int H, </pre></td> <td><pre> procedure Draw - (This : in Pixmap; - X, Y, W, H : in Integer; - CX, CY : in Integer := 0); + (This : in Pixmap; + X, Y, W, H : in Integer; + Clip_X, Clip_Y : in Integer := 0); </pre></td> </tr> diff --git a/doc/fl_rgb_image.html b/doc/fl_rgb_image.html index 1e115d5..061b07a 100644 --- a/doc/fl_rgb_image.html +++ b/doc/fl_rgb_image.html @@ -59,7 +59,42 @@ int alloc_array; <td><pre> const uchar * array; </pre></td> -<td>Intentionally left unbound.</td> +<td><pre> +function Data_Size + (This : in RGB_Image) + return Natural; + +function Get_Datum + (This : in RGB_Image; + Place : in Positive) + return Color_Component +with Pre => Place <= This.Data_Size; + +procedure Set_Datum + (This : in out RGB_Image; + Place : in Positive; + Value : in Color_Component) +with Pre => Place <= This.Data_Size; + +function Slice + (This : in RGB_Image; + Low : in Positive; + High : in Natural) + return Color_Component_Array +with Pre => High <= This.Data_Size, + Post => Slice'Result'Length = Integer'Max (0, High - Low + 1); + +procedure Overwrite + (This : in out RGB_Image; + Place : in Positive; + Values : in Color_Component_Array) +with Pre => Place + Values'Length - 1 <= This.Data_Size; + +function All_Data + (This : in RGB_Image) + return Color_Component_Array +with Post => All_Data'Result'Length = This.Data_Size; +</pre></td> </tr> </table> @@ -78,8 +113,12 @@ function Create (Data : in Color_Component_Array; Width, Height : in Natural; Depth : in Natural := 3; - Line_Data : in Natural := 0) - return RGB_Image; + Line_Size : in Natural := 0) + return RGB_Image +with Pre => (if Line_Size = 0 + then Data'Length = Width * Height * Depth + else Data'Length = Line_Size * Height) + and Data'Length <= Get_Max_Size; </pre></td> </tr> @@ -181,9 +220,9 @@ virtual void draw(int X, int Y, int W, int H, </pre></td> <td><pre> procedure Draw - (This : in RGB_Image; - X, Y, W, H : in Integer; - CX, CY : in Integer := 0); + (This : in RGB_Image; + X, Y, W, H : in Integer; + Clip_X, Clip_Y : in Integer := 0); </pre></td> </tr> diff --git a/doc/fl_tiled_image.html b/doc/fl_tiled_image.html index 39292b1..49aeca0 100644 --- a/doc/fl_tiled_image.html +++ b/doc/fl_tiled_image.html @@ -150,9 +150,9 @@ virtual void draw(int X, int Y, int W, int H, int cx, int cy); </pre></td> <td><pre> procedure Draw - (This : in Tiled_Image; - X, Y, W, H : in Integer; - CX, CY : in Integer); + (This : in Tiled_Image; + X, Y, W, H : in Integer; + Clip_X, Clip_Y : in Integer); </pre></td> </tr> |