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
|
-- File: Image_ColorImage.cdl
-- Created: Tue Jul 27 18:53:48 1993
-- Author: Jean Louis FRENKEL
-- <jlf@sparc3>
---Copyright: Matra Datavision 1993
class ColorImage from Image inherits DColorImage from Image
---Purpose : A ColorImage is a DColorImage with specific method.
-- Each Pixel in the Image ,as a ColorPixel
-- from Aspect, can be use directly as a Color.
-- A ColorImage is also called a "true color image".
uses
Color from Quantity,
ColorPixel from Aspect,
GenericColorMap from Aspect,
Image from Image,
ColorPixelMapHasher from Image,
TypeOfImage from Image
is
Create( x,y,dx,dy : in Integer from Standard )
returns mutable ColorImage from Image;
---Level: Public
---Purpose : Create a ColorImage object.
-- The default Background Pixel is set to Black .
-- All the Image is initialised with Background Pixel
Create( x,y,dx,dy : in Integer from Standard;
BackPixel : ColorPixel from Aspect )
returns mutable ColorImage from Image;
---Level: Public
---Purpose : Create a ColorImage object and set the Background Pixel.
-- All the Image is initialised with Background Pixel
ChooseColorMap( me : immutable ; aSize : Integer from Standard )
returns GenericColorMap from Aspect ;
---Purpose : Create a GenericColorMap object with the best ColorMap
-- of a particular size to use in Dithering method .
-- The best ColorMap is defined to be the one that contains as
-- many as possible of the most frequently used colors.
Type ( me : immutable ) returns TypeOfImage from Image ;
---Level: Public
---Purpose : Returns the Image Type.
PixelColor( me : immutable ; X,Y : in Integer from Standard )
returns Color from Quantity ;
---C++: return const &
---Purpose : Returns the Pixel Color .
Dup ( me : immutable ) returns mutable Image from Image ;
---Purpose : Duplicates a Image.
-- ******************* Redefined method ***************************
-- ShallowCopy (me) returns mutable like me ;
---Level: Public
-- ---Purpose: Returns a copy at the first level of <me>. The objects
-- -- referenced are not copied. Entities copied by
-- -- ShallowCopy are equal.
-- ---C++: function call
-- DeepCopy (me) returns mutable like me ;
---Level: Public
-- ---Purpose: Returns a deep copy of <me>. The objects
-- -- referenced are copied. Entities copied by
-- -- DeepCopy are similar (c.f the Method IsSimilar).
-- ---C++: function call
end ColorImage from Image;
|