1 -- Created by: Tanya COOL
2 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
4 -- The content of this file is subject to the Open CASCADE Technology Public
5 -- License Version 6.5 (the "License"). You may not use the content of this file
6 -- except in compliance with the License. Please obtain a copy of the License
7 -- at http://www.opencascade.org and read it completely before using this file.
9 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 -- The Original Code and all software distributed under the License is
13 -- distributed on an "AS IS" basis, without warranty of any kind, and the
14 -- Initial Developer hereby disclaims all such warranties, including without
15 -- limitation, any warranties of merchantability, fitness for a particular
16 -- purpose or non-infringement. Please see the License for the specific terms
17 -- and conditions governing the rights and limitations under the License.
20 class Arrow from Prs2d inherits Line from Graphic2d
22 ---Purpose: Constructs the primitive arrow
26 Drawer from Graphic2d,
27 GraphicObject from Graphic2d,
29 Array1OfShortReal from TShort,
30 ExtendedString from TCollection,
32 TypeOfArrow from Prs2d,
34 HArray1OfPnt2d from TColgp
37 Create( aGraphicObject: GraphicObject from Graphic2d;
38 Location : Ax2d from gp;
39 OpenAngle : Real from Standard = 5.0;
40 Length : Real from Standard = 5.0;
41 theType : TypeOfArrow from Prs2d = Prs2d_TOA_CLOSED )
43 returns mutable Arrow from Prs2d;
45 ---Purpose: create an arrow:
46 -- "Location" gives the location and direction,
47 -- "OpenAngle" gives the opening angle (in radians),
48 -- "Length" gives the length.
50 ----------------------------------
51 ---Category: Draw and Pick
52 ----------------------------------
54 Draw( me : mutable; aDrawer: Drawer from Graphic2d )
57 ---Purpose: Draws the arrow <me>.
59 DrawElement( me : mutable; aDrawer: Drawer from Graphic2d;
60 anIndex: Integer from Standard)
61 is redefined protected;
63 ---Purpose: Draws element <anIndex> of the arrow <me>.
65 DrawVertex( me : mutable; aDrawer: Drawer from Graphic2d;
66 anIndex: Integer from Standard)
67 is redefined protected;
69 ---Purpose: Draws vertex <anIndex> of the arrow <me>.
71 ArrayOfPnt2d( me ; withTrsf: Boolean from Standard = Standard_False) returns HArray1OfPnt2d from TColgp;
75 TypeOfArrow( me ) returns TypeOfArrow from Prs2d;
77 ---Purpose: Returns type of arrow
84 Pick (me : mutable; X, Y: ShortReal from Standard;
85 aPrecision: ShortReal from Standard;
86 aDrawer: Drawer from Graphic2d)
87 returns Boolean from Standard
90 ---Purpose: Returns Standard_True if the arrow <me> is picked,
91 -- Standard_False if not.
93 Save( me; aFStream: in out FStream from Aspect ) is virtual;
98 myXVert : Array1OfShortReal from TShort;
99 myYVert : Array1OfShortReal from TShort;
100 myTypeOfArrow : TypeOfArrow from Prs2d;
102 end Arrow from Prs2d;