summaryrefslogtreecommitdiff
path: root/spec/fltk-images-tiled.ads
blob: a7470fcf2a01fec1a11471fd40b44f278281572a (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105


--  Programmed by Jedidiah Barber
--  Released into the public domain


package FLTK.Images.Tiled is


    type Tiled_Image is new Image with private;

    type Tiled_Image_Reference (Data : not null access Tiled_Image'Class) is
        limited null record with Implicit_Dereference => Data;




    package Forge is

        function Create
               (From : in out Image'Class;
                W, H : in     Integer := 0)
            return Tiled_Image;

    end Forge;




    --  Copying  --

    function Copy
           (This          : in Tiled_Image;
            Width, Height : in Natural)
        return Tiled_Image'Class;

    function Copy
           (This : in Tiled_Image)
        return Tiled_Image'Class;




    --  Miscellaneous  --

    procedure Inactive
           (This : in out Tiled_Image);

    function Tile
           (This : in out Tiled_Image)
        return Image_Reference;




    --  Colors  --

    procedure Color_Average
           (This   : in out Tiled_Image;
            Hue    : in     Color;
            Amount : in     Blend);

    procedure Desaturate
           (This : in out Tiled_Image);




    --  Drawing  --

    procedure Draw
           (This : in Tiled_Image;
            X, Y : in Integer);

    procedure Draw
           (This           : in Tiled_Image;
            X, Y, W, H     : in Integer;
            Clip_X, Clip_Y : in Integer);


private


    type Tiled_Image is new Image with record
        Dummy : aliased Image;
    end record;

    overriding procedure Finalize
           (This : in out Tiled_Image);


    pragma Inline (Copy);

    pragma Inline (Inactive);
    pragma Inline (Tile);

    pragma Inline (Color_Average);
    pragma Inline (Desaturate);

    pragma Inline (Draw);


end FLTK.Images.Tiled;