0023663: Removing 2D viewer library
[occt.git] / src / Graphic2d / Graphic2d_Vertex.cdl
1 -- Created by: CAL
2 -- Copyright (c) 1993-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
22 class Vertex from Graphic2d
23
24         ---Version:
25
26         ---Purpose: This class allows the creation and update of a
27         --          2D point.
28
29         ---Keywords: Vertex, Coordinate, Point
30         ---Warning:
31         ---References:
32
33 uses
34         Drawer  from Graphic2d,
35         Length  from Quantity
36
37 is
38         -------------------------
39         -- Category: Constructors
40         -------------------------
41
42         Create
43         returns Vertex from Graphic2d;
44         ---Level: Public
45         ---Purpose: Creates a point with 0.0, 0.0 coordinates.
46
47         Create (AX, AY: Real from Standard)
48         returns Vertex from Graphic2d;
49         ---Level: Public
50         ---Purpose: Creates a point with <AX>, <AY> coordinates.
51
52         Create (AX, AY: ShortReal from Standard)
53         returns Vertex from Graphic2d;
54         ---Level: Public
55         ---Purpose: Creates a point with <AX>, <AY> coordinates.
56
57         ---------------------------------------------------
58         -- Category: Methods to modify the class definition
59         ---------------------------------------------------
60
61         SetCoord (me: in out;
62                   Xnew, Ynew: Length from Quantity)
63         is static;
64         ---Level: Public
65         ---Purpose: Modifies the coordinates of the point <me>.
66         ---Category: Methods to modify the class definition
67
68         SetXCoord (me: in out;
69                    Xnew: Length from Quantity)
70         is static;
71         ---Level: Public
72         ---Purpose: Modifies the X coordinate of the point <me>.
73         ---Category: Methods to modify the class definition
74
75         SetYCoord (me: in out;
76                    Ynew: Length from Quantity)
77         is static;
78         ---Level: Public
79         ---Purpose: Modifies the Y coordinate of the point <me>.
80         ---Category: Methods to modify the class definition
81
82         ----------------------------
83         -- Category: Inquire methods
84         ----------------------------
85
86         Coord (me;
87                 AX, AY: out Length from Quantity)
88         is static;
89         ---Level: Public
90         ---Purpose: Returns the coordinates of the point <me>.
91         ---Category: Inquire methods
92
93         X (me) returns Length from Quantity
94         is static;
95         ---Level: Public
96         ---Purpose: Returns the X coordinates of the point <me>.
97         ---Category: Inquire methods
98
99         Y (me) returns Length from Quantity
100         is static;
101         ---Level: Public
102         ---Purpose: Returns the Y coordinate of the point <me>.
103         ---Category: Inquire methods
104
105         IsEqual (me ; other : Vertex) returns Boolean
106         is static;
107         ---Level: Public
108         ---Purpose: Test if <me> and <other> are the the same vertex.
109         ---C++: alias operator ==
110
111         --------------------------
112         -- Category: Class methods
113         --------------------------
114
115         Distance (myclass;
116                    AV1, AV2: Vertex from Graphic2d)
117         returns Length from Quantity;
118         ---Level: Public
119         ---Purpose: Returns the distance between <AV1> and <AV2>.
120         ---Category: Class methods
121
122 fields
123         myX:    ShortReal from Standard;
124         myY:    ShortReal from Standard;
125
126 end Vertex from Graphic2d;