summaryrefslogtreecommitdiff
path: root/src/fltk-images.ads
blob: 86ddbdb1450ec4a5b25191d4f8d75719b9b5f060 (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
106


package FLTK.Images is


    type Image is new Wrapper with private;

    type Blend is new Float range 0.0 .. 1.0;

    No_Image_Error, File_Access_Error, Format_Error : exception;




    package Forge is

        function Create
               (Width, Height, Depth : in Natural)
            return Image;

    end Forge;




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

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




    procedure Color_Average
           (This   : in out Image;
            Col    : in     Color;
            Amount : in     Blend);

    procedure Desaturate
           (This : in out Image);




    procedure Inactive
           (This : in out Image);

    function Is_Empty
           (This : in Image)
        return Boolean;




    function Get_W
           (This : in Image)
        return Natural;

    function Get_H
           (This : in Image)
        return Natural;

    function Get_D
           (This : in Image)
        return Natural;




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

    procedure Draw
           (This       : in Image;
            X, Y, W, H : in Integer;
            CX, CY     : in Integer := 0);

    procedure Draw_Empty
           (This : in Image;
            X, Y : in Integer);


private


    type Image is new Wrapper with null record;

    overriding procedure Finalize
           (This : in out Image);




    function fl_image_fail
           (I : in System.Address)
        return Interfaces.C.int;
    pragma Import (C, fl_image_fail, "fl_image_fail");


end FLTK.Images;