0022627: Change OCCT memory management defaults
[occt.git] / src / Vrml / Vrml_SFImage.cdl
1 -- File:        Vrml_SFImage.cdl
2 -- Created:     Thu May 25 10:59:23 2000
3 -- Author:      Sergey MOZOKHIN
4 --              <smh@russox.nnov.matra-dtv.fr>
5 ---Copyright:    Matra Datavision 2000
6
7
8 -- File:        Vrml_SFImage.cdl
9 -- Created:     Mon Dec 23 15:17:14 1996
10 -- Author:      Alexander BRIVIN
11 --              <brivin@minox.nizhny.matra-dtv.fr>
12 ---Copyright:    Matra Datavision 1996
13
14
15 class SFImage from Vrml inherits  TShared  from  MMgt
16
17   ---Purpose:  defines SFImage type of VRML field types.
18
19     --  SFImage  is  presented  as  three  integers  representing 
20     --  the  width,  height  and  number of components in the image per pixel, 
21     --  followed  by  width*height  hexadecimal  values  representing  the  pixels 
22     --  in  the  image,  which  is  located  in myArray .  
23     --  myArray : Array1OfInteger has  (width*height)  size.
24
25     --  Number of components in the image per pixel is enumeration SFImageNumber  from  Vrml  
26     --  One-component  image  will  have  one-bite  hexadecimal  values 
27     --  presenting  the  intensity  of  the  image 
28     --  Ex:  0xFF  is full  intensity,  0x00 is  no  intensity   
29
30     --  A  two-component  image  puts  the  intensity  in  the  first (hight)  byte 
31     --  and  the  transparency  in  the  second  (low)  byte 
32
33     --  Pixels  in  a  three-component  image  have  the  red  component  in  the  first (hight)   
34     --  byte, followed by  green  and  blue  components.  Ex:  0xFF0000  is  red.
35     --  Four-component  images  put  transparency  byte  after  red/green/blue 
36     --  Ex:  0x0000FF80  is  semi-transparent  blue.  A  value  of  1.0  is  completely transparent,  
37     --  0.0  is  completely  opaque.
38     --  
39
40     --  Each  pixel  is  actually  read  as  a  single  unsigned  number,  so  a  3-component 
41     --  pixel  with  value  "0x0000FF"  can  also  be  written  as  "0xFF"  or  "255"  (decimal).
42     --  Pixels  are  specified  from  left   to  right,  bottom  to  top 
43     --  SetValueOfPixel  sets  value for  the  pixel.  
44
45 uses
46  
47     HArray1OfInteger from TColStd, 
48     SFImageNumber   from Vrml
49
50 is
51  
52     Create returns mutable SFImage from Vrml; 
53
54     Create ( aWidth, aHeight : Integer         from Standard; 
55              aNumber         : SFImageNumber   from Vrml; 
56              anArray         : HArray1OfInteger from TColStd)
57         returns  mutable SFImage from Vrml; 
58
59     SetWidth ( me : mutable; aWidth : Integer from Standard );
60     Width ( me )  returns Integer from Standard;
61
62     SetHeight ( me : mutable; aHeight : Integer from Standard );
63     Height ( me )  returns  Integer from Standard;
64
65     SetNumber ( me : mutable; aNumber : SFImageNumber from Vrml );
66     Number ( me )  returns SFImageNumber from Vrml;
67
68     SetArray ( me : mutable; anArray  : HArray1OfInteger from TColStd ) ;
69     Array ( me ) returns HArray1OfInteger from TColStd; 
70
71     ArrayFlag ( me ) returns Boolean from Standard; 
72
73 fields
74
75     myWidth      : Integer           from Standard;
76     myHeight     : Integer           from Standard;
77     myNumber     : SFImageNumber     from Vrml;
78     myArray      : HArray1OfInteger  from TColStd;
79     myArrayFlag  : Boolean           from Standard; 
80
81 end SFImage;