b311480e |
1 | -- Created on: 1999-10-27 |
2 | -- Created by: VKH |
3 | -- Copyright (c) 1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
7fd59977 |
5 | -- |
b311480e |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | -- Updated: SZV IMP100701 Add the "depth" field and method |
22 | -- to the pixmap object. |
7fd59977 |
23 | |
24 | class PixMap from WNT |
25 | |
26 | ---Version: |
27 | |
28 | ---Purpose: This class defines a windows bitmap |
29 | |
30 | ---Keywords: Bitmap, Pixmap |
31 | |
32 | inherits |
692613e5 |
33 | Transient from Standard |
7fd59977 |
34 | |
35 | uses |
36 | Handle from Aspect, |
37 | Color from Quantity, |
38 | Window from Aspect |
39 | |
40 | raises |
41 | PixmapDefinitionError from Aspect, |
42 | PixmapError from Aspect |
43 | |
44 | is |
45 | |
46 | Create ( aWindow : Window from Aspect; |
47 | aWidth, anHeight : Integer from Standard; |
48 | aCDepth : Integer from Standard = 0 ) |
49 | returns mutable PixMap from WNT |
50 | raises PixmapDefinitionError from Aspect; |
51 | ---Level: Public |
52 | ---Purpose: Warning! When <aDepth> is NULL , the pixmap is created |
53 | -- with the SAME depth than the window <aWindow> |
54 | |
55 | --------------------------------------------------- |
56 | -- Category: Methods to modify the class definition |
57 | --------------------------------------------------- |
58 | |
59 | Destroy ( me : mutable ) |
60 | ---Level: Advanced |
61 | ---Purpose: Destroies the Bitmap |
62 | ---C++: alias ~ |
63 | -- Trigger: Raises if Bitmap is not defined properly |
64 | raises PixmapError from Aspect is virtual; |
65 | |
66 | Dump ( me; aFilename : CString from Standard ; |
67 | aGammaValue: Real from Standard = 1.0 ) |
68 | returns Boolean |
69 | ---Level: Advanced |
70 | ---Purpose: |
71 | -- Dumps the Bitmap to an image file with |
72 | -- an optional gamma correction value |
73 | -- and returns TRUE if the dump occurs normaly. |
74 | ---Category: Methods to modify the class definition |
75 | raises PixmapError from Aspect is virtual; |
76 | |
77 | PixelColor ( me : in; |
78 | theX, theY : in Integer from Standard ) |
79 | returns Color from Quantity |
80 | is virtual; |
81 | ---Purpose: |
82 | -- Returns the pixel color. |
83 | |
84 | ---------------------------- |
85 | -- Category: Inquire methods |
86 | ---------------------------- |
87 | |
88 | PixmapID ( me ) returns Handle from Aspect is virtual; |
89 | ---Level: Advanced |
90 | ---Purpose: Returns the ID of the just created bitmap |
91 | ---Category: Inquire methods |
92 | |
93 | ---------------------------- |
94 | -- Category: Private methods |
95 | ---------------------------- |
96 | |
97 | PreferedDepth( me ; aWindow: Window from Aspect; |
98 | aDepth: Integer from Standard) |
99 | returns Integer from Standard is private; |
100 | |
101 | fields |
692613e5 |
102 | myDC : Handle from Aspect is protected; |
103 | myBitmap : Handle from Aspect is protected; |
104 | myWND : Window from Aspect; |
105 | myWidth : Integer from Standard is protected; |
106 | myHeight : Integer from Standard is protected; |
107 | myDepth : Integer from Standard is protected; |
7fd59977 |
108 | end PixMap; |