summaryrefslogtreecommitdiff
path: root/src/Xw/Xw_PixMap.cdl
blob: fa604fdcfd0a907739e46ba834ffd2d96c80d26a (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
--
-- File:	Xw_PixMap.cdl
-- Created:	14 October 1999
-- Author:	VKH
-- Updated:     GG IMP100701 Add the "depth" field and method
--              to the pixmap object.
--
---Copyright:	MatraDatavision 1999

class PixMap from Xw

    ---Version:

    ---Purpose: This class defines a X11 pixmap

    ---Keywords: Bitmap, Pixmap, X11

inherits
    PixMap                from Aspect
uses
    Handle                from Aspect,
    Color                 from Quantity,
    Window                from Aspect,
    Window                from Xw
raises
    PixmapDefinitionError from Aspect,
    PixmapError           from Aspect
is
    Create ( aWindow          : Window from Aspect;
             aWidth, anHeight : Integer from Standard;
             aDepth           : Integer from Standard = 0 )
    returns mutable PixMap from Xw
    raises PixmapDefinitionError from Aspect;
    ---Level: Public
    ---Purpose:  Warning! When <aDepth> is NULL , the pixmap is created
    -- with the SAME depth than the window <aWindow>

    ---------------------------------------------------
    -- Category: Methods to modify the class definition
    ---------------------------------------------------

    Destroy ( me : mutable )
    ---Level: Advanced
    ---Purpose: Destroies the Pixmap
    --  Trigger: Raises if Pixmap is not defined properly
    raises PixmapError from Aspect is virtual;

    Dump ( me ; aFilename : CString from Standard;
           aGammaValue: Real from Standard = 1.0 )
    returns Boolean
    is virtual;
    ---Level: Advanced
    ---Purpose:
    -- Dumps the Bitmap to an image file with
    -- an optional gamma correction value
    -- and returns TRUE if the dump occurs normaly.
    ---Category: Methods to modify the class definition

    PixelColor ( me         : in;
                 theX, theY : in Integer from Standard )
    returns Color from Quantity
    is virtual;
    ---Purpose:
    -- Returns the pixel color.

    ----------------------------
    -- Category: Inquire methods
    ----------------------------

    PixmapID ( me ) returns Handle from Aspect is virtual;
    ---Level: Advanced
    ---Purpose: Returns the ID of the just created pixmap
    ---Category: Inquire methods

    ----------------------------
    -- Category: Private methods
    ----------------------------

    PreferedDepth( me ; aWindow : Window from Aspect;
                   aDepth : Integer from Standard)
    returns Integer from Standard is private;

fields
    myPixmap : Handle from Aspect is protected;
    myWindow : Window from Xw;
end PixMap;