summaryrefslogtreecommitdiff
path: root/spec/fltk-images-bitmaps.ads
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-01-21 21:04:54 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-01-21 21:04:54 +1300
commitb4438b2fbe895694be98e6e8426103deefc51448 (patch)
tree760d86cd7c06420a91dad102cc9546aee73146fc /spec/fltk-images-bitmaps.ads
parenta4703a65b015140cd4a7a985db66264875ade734 (diff)
Split public API and private implementation files into different directories
Diffstat (limited to 'spec/fltk-images-bitmaps.ads')
-rw-r--r--spec/fltk-images-bitmaps.ads89
1 files changed, 89 insertions, 0 deletions
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;
+