0023510: Integration of test grid "vis" into the new testing system
[occt.git] / src / Graphic2d / Graphic2d_CircleMarker.cdl
1 -- Created on: 1993-06-22
2 -- Created by: Jean Louis FRENKEL
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
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
21
22 -- Modified: TCL G002A, 28-11-00, new section "inquire methods"
23
24
25 class CircleMarker from Graphic2d inherits VectorialMarker from Graphic2d
26
27         ---Purpose: The primitive CircleMarker
28         --          Every marker takes a reference point as an argument in
29         --          its constructor. CircleMarker and EllipsMarker take
30         --          another point as the center and PolylineMarker takes the
31         --          first point of its list as its origin.
32         --          The coordinates of the centre or origin point are offsets
33         --          with respect to the reference point.
34
35         ---Keywords: Primitive, CircleMarker
36         ---Warning:
37         ---References:
38
39 uses
40         Drawer          from Graphic2d,
41         GraphicObject   from Graphic2d,
42         Length          from Quantity,
43         PlaneAngle      from Quantity,
44         FStream         from Aspect,
45         IFStream        from Aspect
46
47
48 raises
49         CircleDefinitionError   from Graphic2d
50
51 is
52         -------------------------
53         -- Category: Constructors
54         -------------------------
55
56         Create( aGraphicObject: GraphicObject from Graphic2d;
57                     aXPosition, aYPosition: Length from Quantity;
58                     X, Y: Length from Quantity;
59                     Radius: Length from Quantity)
60         returns mutable CircleMarker from Graphic2d
61         ---Level: Public
62         ---Purpose: Creates a complete circle.
63         --          The reference point is <aXPosition>, <aYPosition>
64         --          The center is <X>, <Y>.
65         --          The radius is <Radius>.
66         --  Warning: Raises CircleDefinitionError if the
67         --          radius is null.
68         raises CircleDefinitionError from Graphic2d;
69
70         Create( aGraphicObject: GraphicObject from Graphic2d;
71                     aXPosition, aYPosition: Length from Quantity;
72                     X, Y: Length from Quantity;
73                     Radius: Length from Quantity;
74                     Alpha , Beta: PlaneAngle from Quantity)
75         returns mutable CircleMarker from Graphic2d
76         ---Level: Public
77         ---Purpose: Creates an arc.
78         --          The reference point is <aXPosition>, <aYPosition>
79         --          The center is <X>, <Y>.
80         --          The radius is <Radius>.
81         --          Angles are measured counterclockwise with 0 radian
82         --          at 3 o'clock.
83         --  Warning: Raises CircleDefinitionError if the
84         --          radius is null.
85         raises CircleDefinitionError from Graphic2d;
86
87
88         --------------------------
89         -- Category: Draw and Pick
90         --------------------------
91
92         Draw (me : mutable; aDrawer: Drawer from Graphic2d)
93         is static protected;
94         ---Level: Internal
95         ---Purpose: Draws the circle <me>.
96
97         DrawElement( me : mutable; aDrawer: Drawer from Graphic2d;
98                  anIndex: Integer from Standard)
99         is redefined protected;
100     ---Level: Internal
101     ---Purpose: Draws element <anIndex> of the circle marker <me>.
102
103     DrawVertex( me : mutable; aDrawer: Drawer from Graphic2d;
104                 anIndex: Integer from Standard)
105         is redefined protected;
106     ---Level: Internal
107     ---Purpose: Draws vertex <anIndex> of the circle marker <me>.
108
109
110         Pick (me : mutable; X, Y: ShortReal from Standard;
111                 aPrecision: ShortReal from Standard;
112                 aDrawer: Drawer from Graphic2d)
113         returns Boolean from Standard is static protected;
114         ---Level: Internal
115         ---Purpose: Returns Standard_True if the circle <me> is picked,
116         --          Standard_False if not.
117
118         --------------------------------------
119         -- Category: Inquire methods
120         --------------------------------------
121
122     Center( me; X, Y: out Length from Quantity );  
123         ---Level: Public
124         ---Purpose: returns the coordinates of center of the circle marker
125         
126         Radius( me ) returns Length from Quantity;
127         ---Level: Public
128         ---Purpose: returns the radius of this circle marker
129         
130         FirstAngle( me ) returns PlaneAngle from Quantity;
131         ---Level: Public
132         ---Purpose: returns the first angle of the arc marker
133         
134         SecondAngle( me ) returns PlaneAngle from Quantity;
135         ---Level: Public
136         ---Purpose: returns the second angle of the arc marker
137
138         ----------------------------------------------------------------------
139
140         Save( me; aFStream: in out FStream from Aspect ) is virtual;
141         Retrieve( myclass; anIFStream: in out IFStream from Aspect;
142                 aGraphicObject: GraphicObject from Graphic2d );
143
144 fields
145
146         myX           : ShortReal from Standard;
147         myY           : ShortReal from Standard;
148         myRadius      : ShortReal from Standard;
149         myFirstAngle  : ShortReal from Standard;
150         mySecondAngle : ShortReal from Standard;
151         myisArc       : Boolean from Standard;
152         
153 end CircleMarker from Graphic2d;