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