0024131: TKOpenGL redesign GPU memory management for markers presentation
[occt.git] / src / Graphic3d / Graphic3d_AspectMarker3d.cdl
1 -- Created by: NW,JPB,CAL
2 -- Copyright (c) 1991-1999 Matra Datavision
3 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
4 --
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
9 --
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 --
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
19
20
21 class AspectMarker3d from Graphic3d inherits AspectMarker from Aspect
22
23   ---Version:
24
25   ---Purpose: Creates and updates an attribute group for
26   --          marker type primitives. This group contains the type
27   --          of marker, its colour, and its scale factor.
28   ---Keywords: Marker, Color, Scale, Type
29
30   ---Warning:
31   ---References:
32
33 uses
34
35   Color                from Quantity,
36   TypeOfMarker         from Aspect,
37   HArray1OfByte        from TColStd,
38   PixMap_Handle        from Image,
39   MarkerImage_Handle   from Graphic3d
40
41 is
42
43   Create
44   returns mutable AspectMarker3d from Graphic3d;
45   ---Level: Public
46   ---Purpose: Creates a context table for marker primitives
47   --          defined with the following default values:
48   --
49   --          Marker type : TOM_X
50   --          Colour      : YELLOW
51   --          Scale factor: 1.0
52
53   Create (theType             : TypeOfMarker from Aspect;
54           theColor            : Color from Quantity;
55           theScale            : Real from Standard)
56   returns mutable AspectMarker3d from Graphic3d;
57
58   Create (theColor            : Color from Quantity;
59           theWidth            : Integer from Standard;
60           theHeight           : Integer from Standard;
61           theTextureBitmap    : HArray1OfByte from TColStd)
62   returns mutable AspectMarker3d from Graphic3d;
63   ---Level: Public
64   ---Purpose: Creates a context table for marker primitives
65   --          defined with the specified values.
66
67   Create (theTextureImage     : PixMap_Handle from Image)
68   returns mutable AspectMarker3d from Graphic3d;
69   ---Level: Public
70   ---Purpose: Creates a context table for marker primitives
71   --          defined with the specified values.
72
73   GetTextureSize (me;
74                   theWidth : out Integer from Standard;
75                   theHeight: out Integer from Standard);
76   ---Level: Public
77   ---Purpose: Returns marker's texture size.
78
79   GetMarkerImage (me)
80   returns MarkerImage_Handle from Graphic3d;
81   ---Level: Public
82   ---Purpose: Returns marker's image texture.
83   --- Could be null handle if marker aspect has been initialized as
84   --- default type of marker.
85   ---C++: return const &
86
87   SetBitMap (me: mutable;
88              theWidth  : Integer from Standard;
89              theHeight : Integer from Standard;
90              theTexture: HArray1OfByte from TColStd ) is static;
91
92 fields
93
94 --
95 -- Class: Graphic3d_AspectMarker3d
96 --
97 -- Purpose: Declaration of context-specific variables
98 --          for drawing 3d markers.
99 --
100 -- Reminder: A context for drawing 3d markers inherits:
101 --            - the colour
102 --            - the type of marker
103 --            - the scale factor
104 --           defined by AspectMarker.
105
106 myMarkerImage : MarkerImage_Handle from Graphic3d is protected;
107
108 end AspectMarker3d;