summaryrefslogtreecommitdiff
path: root/src/fltk-images-bitmaps.ads
blob: cf35396ec07bae8ef36b9ae56d6b20086007b673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85


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;