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
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.
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.
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.
22 -- Modified: TCL G002A, 28-11-00, new section "inquire methods"
25 class CircleMarker from Graphic2d inherits VectorialMarker from Graphic2d
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.
35 ---Keywords: Primitive, CircleMarker
40 Drawer from Graphic2d,
41 GraphicObject from Graphic2d,
43 PlaneAngle from Quantity,
49 CircleDefinitionError from Graphic2d
52 -------------------------
53 -- Category: Constructors
54 -------------------------
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
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
68 raises CircleDefinitionError from Graphic2d;
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
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
83 -- Warning: Raises CircleDefinitionError if the
85 raises CircleDefinitionError from Graphic2d;
88 --------------------------
89 -- Category: Draw and Pick
90 --------------------------
92 Draw (me : mutable; aDrawer: Drawer from Graphic2d)
95 ---Purpose: Draws the circle <me>.
97 DrawElement( me : mutable; aDrawer: Drawer from Graphic2d;
98 anIndex: Integer from Standard)
99 is redefined protected;
101 ---Purpose: Draws element <anIndex> of the circle marker <me>.
103 DrawVertex( me : mutable; aDrawer: Drawer from Graphic2d;
104 anIndex: Integer from Standard)
105 is redefined protected;
107 ---Purpose: Draws vertex <anIndex> of the circle marker <me>.
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;
115 ---Purpose: Returns Standard_True if the circle <me> is picked,
116 -- Standard_False if not.
118 --------------------------------------
119 -- Category: Inquire methods
120 --------------------------------------
122 Center( me; X, Y: out Length from Quantity );
124 ---Purpose: returns the coordinates of center of the circle marker
126 Radius( me ) returns Length from Quantity;
128 ---Purpose: returns the radius of this circle marker
130 FirstAngle( me ) returns PlaneAngle from Quantity;
132 ---Purpose: returns the first angle of the arc marker
134 SecondAngle( me ) returns PlaneAngle from Quantity;
136 ---Purpose: returns the second angle of the arc marker
138 ----------------------------------------------------------------------
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 );
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;
153 end CircleMarker from Graphic2d;