From b4438b2fbe895694be98e6e8426103deefc51448 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Tue, 21 Jan 2025 21:04:54 +1300 Subject: Split public API and private implementation files into different directories --- spec/fltk-images-bitmaps.ads | 89 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 spec/fltk-images-bitmaps.ads (limited to 'spec/fltk-images-bitmaps.ads') diff --git a/spec/fltk-images-bitmaps.ads b/spec/fltk-images-bitmaps.ads new file mode 100644 index 0000000..d8730a2 --- /dev/null +++ b/spec/fltk-images-bitmaps.ads @@ -0,0 +1,89 @@ + + +-- Programmed by Jedidiah Barber +-- Released into the public domain + + +package FLTK.Images.Bitmaps is + + + ------------- + -- Types -- + ------------- + + type Bitmap is new Image with private; + + type Bitmap_Reference (Data : not null access Bitmap'Class) is limited null record + with Implicit_Dereference => Data; + + + + + -------------------- + -- Construction -- + -------------------- + + package Forge is + + -- Please note that I'm pretty sure (?) input data here should be some + -- declared item that lives at least as long as the resulting Bitmap + + function Create + (Data : in Color_Component_Array; + Width, Height : in Natural) + return Bitmap; + + end Forge; + + function Copy + (This : in Bitmap; + Width, Height : in Natural) + return Bitmap'Class; + + function Copy + (This : in Bitmap) + return Bitmap'Class; + + + + + ---------------- + -- Activity -- + ---------------- + + procedure Uncache + (This : in out Bitmap); + + + + + --------------- + -- Drawing -- + --------------- + + procedure Draw + (This : in Bitmap; + X, Y : in Integer); + + procedure Draw + (This : in Bitmap; + X, Y, W, H : in Integer; + CX, CY : in Integer := 0); + + +private + + + type Bitmap is new Image with null record; + + overriding procedure Finalize + (This : in out Bitmap); + + + pragma Inline (Copy); + pragma Inline (Uncache); + pragma Inline (Draw); + + +end FLTK.Images.Bitmaps; + -- cgit