0023510: Integration of test grid "vis" into the new testing system
[occt.git] / src / Graphic2d / Graphic2d_Ellips.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 Ellips from Graphic2d inherits Line from Graphic2d
26
27 ---Version:
28
29 ---Purpose: The primitive Ellips
30
31 ---Keywords: Primitive, Ellips
32 ---Warning:
33 ---References:
34
35uses
36
37 Drawer from Graphic2d,
38 GraphicObject from Graphic2d,
39 PlaneAngle from Quantity,
40 Length from Quantity,
41 FStream from Aspect,
42 IFStream from Aspect
43
44
45raises
46
47 EllipsDefinitionError from Graphic2d
48
49is
50 -------------------------
51 -- Category: Constructors
52 -------------------------
53
54 Create (aGraphicObject: GraphicObject from Graphic2d;
55 X, Y: Length from Quantity;
56 MajorRadius, MinorRadius: Length from Quantity;
57 anAngle: PlaneAngle from Quantity)
58 returns mutable Ellips from Graphic2d
59 ---Level: Public
60 ---Purpose: Creates an ellipse.
61 -- The center is <X>, <Y>.
62 -- Angles are measured counterclockwise with 0 radian
63 -- at 3 o'clock.
64 ---Category: Constructors
65 ---Warning: Raises EllipsDefinitionError if the
66 -- major radius or the minor radius is null.
67 raises EllipsDefinitionError from Graphic2d;
68
69 --------------------------
70 -- Category: Draw and Pick
71 --------------------------
72
73 Draw (me : mutable; aDrawer: Drawer from Graphic2d)
74 is static protected;
75 ---Level: Internal
76 ---Purpose: Draws the ellipse <me>.
77
78 DrawElement( me : mutable; aDrawer: Drawer from Graphic2d;
79 anIndex: Integer from Standard)
80 is redefined protected;
81 ---Level: Internal
82 ---Purpose: Draws element <anIndex> of the circle <me>.
83
84 DrawVertex( me : mutable; aDrawer: Drawer from Graphic2d;
85 anIndex: Integer from Standard)
86 is redefined protected;
87 ---Level: Internal
88 ---Purpose: Draws vertex <anIndex> of the circle <me>.
89
90 Pick (me : mutable; X, Y: ShortReal from Standard;
91 aPrecision: ShortReal from Standard;
92 aDrawer: Drawer from Graphic2d)
93 returns Boolean from Standard
94 is static protected;
95 ---Level: Internal
96 ---Purpose: Returns Standard_True if the ellipse <me> is picked,
97 -- Standard_False if not.
98
99 --------------------------------------
100 -- Category: Inquire methods
101 --------------------------------------
102
103 Center( me; X, Y: out Length from Quantity );
104 ---Level: Public
105 ---Purpose: returns the coordinates of center of the ellipse
106
107 MajorRadius( me ) returns Length from Quantity;
108 ---Level: Public
109 ---Purpose: returns the radius of the ellipse
110
111 MinorRadius( me ) returns Length from Quantity;
112 ---Level: Public
113 ---Purpose: returns the radius of the ellipse
114
115 Angle( me ) returns PlaneAngle from Quantity;
116 ---Level: Public
117 ---Purpose: returns the angle of the ellipse
118
119 ----------------------------------------------------------------------
120
121 Save( me; aFStream: in out FStream from Aspect ) is virtual;
122 Retrieve(myclass; anIFStream: in out IFStream from Aspect;
123 aGraphicObject: GraphicObject from Graphic2d);
124
125fields
126
127 myX: ShortReal from Standard;
128 myY: ShortReal from Standard;
129 myMajorRadius: ShortReal from Standard;
130 myMinorRadius: ShortReal from Standard;
131 myAngle: ShortReal from Standard;
132
133end Ellips from Graphic2d;